Monday, December 21, 2009

ODBC Connection String FAQ

Everything you always wanted to know about ODBC connection strings and the iSeries.
When using ODBC to talk to the AS/400, you can use a data source name to connect or you can use a connection string with all of the relevant settings in the string you pass to the ODBC Driver. A data source name stores ODBC information in the Windows registry after you use the ODBC Data Source Administrator to configure your data source. The problem with data source names is that each time you attempt to connect; the program has to look up information about the connection options in the Windows registry. If you are programming a web application, you could be issuing hundreds of connections to the iSeries a minute, and the performance hit of reading the registry is not something you want to have in your application. Another problem with data source names, if you are deploying ODBC applications to end users, is that you must set up the data source on the end users machine as part of your program installation process. This can be problematic, and if the desktop is not properly configured you end users can futz with their ODBC settings and possibly make changes the break the application. All of the above can be avoided by using a connection string rather than using an ODBC data source name when connecting. In addition, you will have finite control over how you application interacts with the iSeries.

Read this article Read this article Read this article Read this article

No comments:

Post a Comment