Edward
asked on
Programmically connect to 32bit ODBC DSN from 64bit Windows
I need to use a 32bit ODBC DSN connection from Window 2008 64bit. I have created a DSN using C:\Windows\SysWOW64\odbcad 32.exe I do not have a 64bit driver for our progress database until 6-8 months from now. (fyi if I get it now it cost us $2500, if I wait until we upgrade our ERP system then its free)
In my code I have it just like the way I connecto to DSN on a 32bit server.
public static string strODBCConn = "DSN=Nxt;UID=SYSPROGRESS;P WD=XXX;";
public DataSet FillDataSetODBC(string strSQLCmd, string strTable, String strODBCConn)
{
// return a filled dataset.
DataSet myDS = new DataSet();
OdbcDataAdapter DBAdapt = new OdbcDataAdapter();
//Set up the data adapter...
DBAdapt = new OdbcDataAdapter(strSQLCmd, strODBCConn);
//Fill the dataset
DBAdapt.Fill(myDS, strTable);
return myDS;
}
In my code I have it just like the way I connecto to DSN on a 32bit server.
public static string strODBCConn = "DSN=Nxt;UID=SYSPROGRESS;P
public DataSet FillDataSetODBC(string strSQLCmd, string strTable, String strODBCConn)
{
// return a filled dataset.
DataSet myDS = new DataSet();
OdbcDataAdapter DBAdapt = new OdbcDataAdapter();
//Set up the data adapter...
DBAdapt = new OdbcDataAdapter(strSQLCmd,
//Fill the dataset
DBAdapt.Fill(myDS, strTable);
return myDS;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sounds feasible. So the driver you were using was working on the x64 system. Good :-)
To find out whether your driver works and can connect to the datasource, can you add a connection in the Servers windows in VS? Or can you go to Control Panel > Administrative Tools > Data Sources to create a connection (after which you can take the connection string and copy it to your application, which should "just work").