Have found references to use BdeInst.dll for register an DSN from the installation prg, but no example for SQL Server 2000?
Anyone?
How to register an SQL Server 2000 DSN?
5 posts
Thanks a lot, now it works! There was a typing error on the last link where it said:
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Driver" "C:\\WINNT\\System32\\SQLSRV32.dll"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Server" "Server Name"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Database" "db on sql server"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "LastUser" "sa"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODB.INI\ODBC Data Sources" "DSNNAME" "SQL Server"
But it should be:
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Driver" "C:\\WINNT\\System32\\SQLSRV32.dll"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Server" "Server Name"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Database" "db on sql server"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "LastUser" "sa"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\ODBC Data Sources" "DSNNAME" "SQL Server"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Driver" "C:\\WINNT\\System32\\SQLSRV32.dll"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Server" "Server Name"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Database" "db on sql server"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "LastUser" "sa"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODB.INI\ODBC Data Sources" "DSNNAME" "SQL Server"
But it should be:
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Driver" "C:\\WINNT\\System32\\SQLSRV32.dll"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Server" "Server Name"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "Database" "db on sql server"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\DSNNAME" "LastUser" "sa"
WriteRegStr HKEY_LOCAL_MACHINE "Software\ODBC\ODBC.INI\ODBC Data Sources" "DSNNAME" "SQL Server"
Could you point out the difference? Perhaps emphesize it with some color?
Thanks.
Thanks.
Last line it says:
ODB.ini instead of ODBC.ini
ODB.ini instead of ODBC.ini