I have a VB project done in VB6 which connects to an ODBC database via DAO.
Certain clients complain that the connection to the database fails and others report success. This depends on which parts of Office they have installed. A good example is if you have Excel 97 and the Data Controls part of Excel installed it works, uninstall it and no connection.
I have found that the VB code in the application bombs out at this line.
Set wrkActivate = CreateWorkspace(ODBC_WORKSPACE_NAME, "", "", dbUseODBC)
Thats right it is this 'VB CreateWorkspace function' which is a legitimate way to access the database using DAO. So as you can see I am using the ODBCDirect version of DAO to try and access Data sources through ODBC. As I am beginning to understand it, DAO is very much linked to Office and there can be several different version of DAOs installed by various versions of Microsoft Applications. Therefore it is not much of a surprise that I am experiencing problems for example when removing Excel 97 and its Data control. The CreateWorkspace function doesn't work.
I obviously don't want this to happen and seeing as people can use say either office 97/2000 and have installed whichever components they want then a developer must have experienced this problem at some time.
There must be a VB expert who can help me out here. Otherwise you would have people using this DAO connectivity for their programs and continually being told by random clients that it doesn't work for them.
Surely someone can advise me here. Now as far as I understand DAO is a common component which is available to Office and other apps. I would like someone to explain to me what I need to package with my application to make it work regardless if a user decides to uninstall Excel 97 or Excel 2000 or whatever part of Office. Or if anyone tell me what I can do to guarantee success.
I'm pretty desperate for help as the program has not been released and a frustrated client is having meetings to discuss the problem. I can help out with any further info.