Hi Mark,
You don't have to resort to the option of changing your code from OleDb to ODBC just because you don't want to use connection strings. Not sure why, but maybe for security
reasons I would imagine. Bill's suggestion to use a UDL file is excellent, however here are other option to where you can store your connection string:
- In Application configuration file.
- In the Windows Registry
- In a custom file
- In the COM+ catalog by using construction strings (for Serviced Components Only).
I'm sure selecting one of the above options is much easier than changing the code. By changing the code from OleDb to ODBC, you may run into issues where syntax
changes are required or issues related to the fact that you are using different provider (for example from Sqloledb provider to SQL Server ODBC driver) to communicate with
the back end database so heavy re-testing of the App is a must.
I hope this helps!
Thanks,
Hussein Abuthuraya
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.