Dear
i am using Access with vb6, how i will define DSN on client side to access database from main server
Printable View
Dear
i am using Access with vb6, how i will define DSN on client side to access database from main server
There is no need for dsn at all - use OLEDB provider via ADO and you should be good.
DSNs are a relic of the ODBC era. They were replaced by UDLs and OLEDB a long, long time ago.
DSNs can be problematic in 64-bit editions of Windows as well, for a number of reasons. They can still be used but there are several quirks to be aware of.
In most cases you can move from an ODBC driver to an OLEDB Provider for the same database. Then you can either hard-code your connection strings in the program, load them from INI/config files at runtime, or deploy a UDL that you reference in your connection string. The best place for your UDLs is generally an application folder under the [CommonAppData] folder.
See How To Specify a UDL File as the Source of Connection Attributes for a VB Data Environment Connection Object and many related MS KB articles published since 1996.