
Problems using ODBCDirect with Excel 95 VBA!!!
Hi,
We have an Excel 95 add-in that uses DAO. In particular it uses ODBCDirect.
When developing this code, we had VB 5 etc installed on the machines so
everything worked fine. Now when we are installing all these exes on client
machines and running the Excel add-in, we are getting a page fault in
OLEAUT32.DLL when we are executing the following line of code
DBEngine.SystemDB = ".....\system.mdw".
Now these machines have Excel 95 installed ( which installs DAO 3.0) and
have DAO 3.5 installed which we need for our other VB exes. Upon reading
some article in VBPJ on ODBcDircet, I came across the following line which
says that "ODBC Direct cannot be used inside OLE Automation CLients like
Excel 95 etc unless VB 4.0 Enterprise edition is installed or licensed on
that machine" which is weird because our problem does go away if we install
and uninstall VB 5 enterprise edition on that machine!!!!!!!!!!!!!!
In the Tools , References menu Item in Excel , I have tried checking "DAO
3.5 Object Library" and "DAO 3.0 Object Library" on their own. With the
latter, it complains about types like Connections etc because ODBCDirect
was available from DAO 3.1 onwards.
Infact if I try to do Msgbox DBEngine.Version I get an error "Object
required" with the References pointing to "Dao 3.5"....If i try to create a
DbEng object using CreateObject("DAO.DbEngine.35"), i get some other error
"User defined type not known" or something like that....
Has anyone come across this...Is there any way around....
Any help will be greatly appreciated...btw we are doing all this on win
95/nt 4.0
Thanks
Rajesh H