I have a problem with my excel add-in which works fine for earlier versions of excel - but does not work properly with excel 2007. The OP system is windows XP.
The code to connect is as follows:
Public cs_dbs As Database
Set cs_dbs = OpenDatabase(dbName, False, True, "ODBC;Regional=Yes")
When dbName is empty, the user will be prompted to select an ODBC source. After I select the source I get the following error message: Cannot open MyDB database. Error: ODBC--connection to 'MyDBSQL2005' failed.
If I look in the odbc trace log, I will eventually see the following error: DIAG [S1000] [Microsoft][ODBC Driver Manager] General error: invalid window handle.
Trying to connect to a Progress database, also ends in failure after I select an odbc source. In this case I should see a window prompting me for a password but I just get the error message that the operation was cancelled by the user.
The following will work:
Public cs_dbs As Database
Stop
Set cs_dbs = OpenDatabase(dbName, False, True, "ODBC;Regional=Yes")
In debug mode, I can connect to both DB types. The odbc trace logs show no errors.
Does anybody have any clue what is going wrong here? I hope I have provided enough information.
The code to connect is as follows:
Public cs_dbs As Database
Set cs_dbs = OpenDatabase(dbName, False, True, "ODBC;Regional=Yes")
When dbName is empty, the user will be prompted to select an ODBC source. After I select the source I get the following error message: Cannot open MyDB database. Error: ODBC--connection to 'MyDBSQL2005' failed.
If I look in the odbc trace log, I will eventually see the following error: DIAG [S1000] [Microsoft][ODBC Driver Manager] General error: invalid window handle.
Trying to connect to a Progress database, also ends in failure after I select an odbc source. In this case I should see a window prompting me for a password but I just get the error message that the operation was cancelled by the user.
The following will work:
Public cs_dbs As Database
Stop
Set cs_dbs = OpenDatabase(dbName, False, True, "ODBC;Regional=Yes")
In debug mode, I can connect to both DB types. The odbc trace logs show no errors.
Does anybody have any clue what is going wrong here? I hope I have provided enough information.