Sybase DB access in windows 7
-
Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.
connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****
using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
{
OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
connection.Open();
adapter.Fill(dt);
connection.Close();
}above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Anything i am missing ? or do i need to configure anything? appriciated u r quick response.
Ramana
-
Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.
connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****
using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
{
OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
connection.Open();
adapter.Fill(dt);
connection.Close();
}above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Anything i am missing ? or do i need to configure anything? appriciated u r quick response.
Ramana
Ramana.Gali wrote:
where as same code is not working in windows 7. I am executing in 64bit machine.
What does "not working" mean? Is there an error message?
The difficult we do right away... ...the impossible takes slightly longer.
-
Ramana.Gali wrote:
where as same code is not working in windows 7. I am executing in 64bit machine.
What does "not working" mean? Is there an error message?
The difficult we do right away... ...the impossible takes slightly longer.
updated error details..
Ramana
-
updated error details..
Ramana
Have you used the 32-bit ODBC Data Source manager to configure the data source name? This happens when you have a 64-bit DSN configured, but not the 32-bit one.
The difficult we do right away... ...the impossible takes slightly longer.
-
Have you used the 32-bit ODBC Data Source manager to configure the data source name? This happens when you have a 64-bit DSN configured, but not the 32-bit one.
The difficult we do right away... ...the impossible takes slightly longer.
OK. then how/what do i configure 32 bit DSN?
Ramana
-
OK. then how/what do i configure 32 bit DSN?
Ramana
You have to run this program:
c:\windows\sysWOW64\odbcad32.exe
Don't run the one in Control Panel, cause that will be for 64-bit.
The difficult we do right away... ...the impossible takes slightly longer.
-
You have to run this program:
c:\windows\sysWOW64\odbcad32.exe
Don't run the one in Control Panel, cause that will be for 64-bit.
The difficult we do right away... ...the impossible takes slightly longer.
-
Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.
connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****
using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
{
OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
connection.Open();
adapter.Fill(dt);
connection.Close();
}above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Anything i am missing ? or do i need to configure anything? appriciated u r quick response.
Ramana
Ramana.Gali wrote:
connectionString=DRIVER=MERANT 3.60 32-BIT
If you installed a 32 bit ODBC driver, you must set the target platform of your solution to x86.