Reputation: 241
I have a connection string like
Driver={SYBASE ASE ODBC Driver};Srvr=;Uid=;Pwd=;Database=dbname;
Port=*;WorkstationID={WorkstationID};ApplicationName=Wingman
and whenever I try to open the connection using Conn.open()
, I get the following error:
:ERROR [IM002] [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified
Is this problem specific to Windows 7?
I tried number of ways like creating a system DSN in ODBC Data Source Administrator (64 bit) but the code refers to ODBC Data Source Administrator (32 bit).
I can't find the drivers for Sybase in ODBC Administrator (32 bit).
Upvotes: 2
Views: 3920
Reputation: 216313
If you are on a Win7 64 bit system then the ODBC Administrator for 32bit drivers could be found manually browsing to
%systemdrive%\Windows\SysWoW64\ODBCAD32.EXE
The icon inside the Control Panel/Administrative Tools refers to the 64bit version.
The 32-bit version of the ODBC Administrator tool shows only the 32bit system/user DSN while the 64bit version (located in %systemdrive\Windows\System32\ODBCAD32.exe) shows only the 64bit system/user DSN. You should work with the correct version for your drivers.
Keep present, if your code is compiled for AnyCPU platform and it runs on a 64bit system then it looks at the datasources defined by the x64 version of the ODBCAD32.exe and this datasources cannot use 32bit drivers. On the other side, if your code is compiled for x86 platform and runs on a 64bit system it looks at the datasources defined by the x86 version of ODBCAD32.exe. It is up to you to define the datasaources in the correct location.
Upvotes: 2