storing raw SQL

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Previously, all our applications have used stored procedures against SQL
Server for data access. However, we are now hitting an Informix database
and need to pass raw SQL queries.

Where's the best place to store these sometimes lengthy queries? In a
method that returns a single string prefixed by the @ symbol? In an XML
file? In a text file? Something else?

Thanks in advance.

Mark
 
Where's the best place to store these sometimes lengthy queries? In a
method that returns a single string prefixed by the @ symbol? In an XML
file? In a text file? Something else?

put it in a text file and add the text file to the project (set it as
"embedded resource").

then use reflection (Assembly's GetManifestResourceStream for example) to
get the content in the runtime.

regards,
Wiktor Zychla
 
Back
Top