views:

62

answers:

1

Gurus,

Is there anyway that I can setup my DSN to avoid having the say "LIBRARY.TABLE" in my SQL statements?

Our test and production environments differ in that the test AS400 does not have "TABLE" in the same library as production. I don't want to have to change code in moving from test to production. That defeats the purpose.

Chris

+1  A: 

Yes, you can do this by specifying the library that your table is in in your connection string using LibraryList and Default Collection. For example:

DataSource=Server;LibraryList=LIB1, LIB2, LIB3;UserID=something;Password=something;Default Collection=LIB1

If you have a DSN set up as an ODBC connection on your system/server, you can do the same in the Library list and SQL default library textboxes on the Server tab of the System DSN configuration dialog.

AJ