DAODBEngine
G'day
After a VB6 to VB.NET 2.0 upgrade I am left with an IBM DB connection problem. The original version works. The upgrade doesn't. They are both running on the same PC and are configured the same.
Original Code:
Public dbIBMHost As Database
Set dbIBMHost = Workspaces(0).OpenDatabase("", False, False, _
"ODBC;DSN=ValidDSN;UID=ValidUserID;PWD=ValidPassword;")
New Code
Public dbIBMHost As dao.Database
dbIBMHost = DAODBEngine_definst.Workspaces(0).OpenDatabase("", False, False, _
"ODBC;DSN=ValidDSN;UID=ValidUserID;PWD=ValidPassword;")
and the upgrade kindly supplied the following Module to define DAODBEngine_definst
Module UpgradeSupport
Friend DAODBEngine_definst As New dao.DBEngine
End Module
The Project References list includes 'dao' and there is nothing obviously wrong, like null objects, but the following error occurs:
{Microsoft.VisualBasic.ErrObject}
Description: "ODBC--connection to 'ValidDSN' failed."
Erl: 34
HelpContext: 5003151
HelpFile: "jeterr40.chm"
LastDllError: 0
Number: 3151
Source: "DAO.Workspace"
I'm at a loss. Hope someone can help.
Cheers
Maz

