Ruby on Rails Wednesday, August 29, 2012

Here is the Task...

The EPC's(PDF's) themselves are not stored in the database, this is
because each client can have hundreds of EPCs and we don't want these to
increase the size of the database, instead we save the EPC's on the
server and link to them in the database.

To get the path of the EPC you need to get the path out of the database.
This can be done using the following SQL.

Select C."value"||A.epc_file_name
From DBA.enr_rds_xml_datas A
Join DBA.GlobalIniFile B on B.section = 'Paths' and B.ident = 'EPCStore'
Where A.location_id = MyLoCode
And A.is_current = 1;

You might want to look at creating a view for the above SQL and then
creating a Model for it so that you can access the data in Ruby easily.

You will need to create a new page for this as there is no existing one
currently. The EPC that is opened will depend on the location that the
user is currently on. The is_current flag in enr_rds_xml_datas will
ensure that only one EPC is returned for the current location.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment