Board index » delphi » OLE error 80040112 - using DAO TLB to access Access DB's

OLE error 80040112 - using DAO TLB to access Access DB's

Am getting an OLE error 80040112 when starting a program written with Delphi
3.01.
I had imported the DAO350.DLL (Microsoft DAO 3.5 Object Library (Version
4.0)) and accessing Access databases without any problems.
Built an install for the app using Visual Basic 5 for VISDATA so that it
included all the DAO dll's.  The VISDATA app runs fine, but not the other
app written in Delphi.  Both are 32-bit.

However, still getting the OLE error.

Anyone have any ideas, it would be greatly appreciated.

Thanks in advance.

 

Re:OLE error 80040112 - using DAO TLB to access Access DB's


I've made the connection to DAO without problems. I must say i did not
use the typelib. The only difference that I noticed between Delphi and
VB is that you need to expilicitly login to the Access database system
in Delphi.

The folowing code worked for me.

 MeDBEngine := CreateOleObject('DAO.DBEngine.35');

  MeWorkSpace := MeDBEngine.CreateWorkSpace('#Default
WorkSpace#','Admin','','');
// login to Access with default loginname and password.

  MeDatabase := MeWorkSpace.OpenDatabase('C:\Mydatabase97.mdb');
 // RecordSet := Database.RecordSets(0);
  MeRecordset := MeDatabase.OpenRecordSet('a_table',1);
  MeRecordSet.MoveFirst ;

Maybe this has been of some help.

Edwin Teisman  teis...@defacto.nl

Re:OLE error 80040112 - using DAO TLB to access Access DB's


Have you found a solution yet? I have exactly the same problem, but I
believe it works fine on machines with Access installed.

80040112 is an undocumented error which supposedly means that the com object
does not have a license. I can't understand why it shouldn't have a license,
or what kind of license I would need, though.

David Thompson skrev i meldingen <6k41o8$...@dfw-ixnews8.ix.netcom.com>...

Quote
>Am getting an OLE error 80040112 when starting a program written with
Delphi
>3.01.
>I had imported the DAO350.DLL (Microsoft DAO 3.5 Object Library (Version
>4.0)) and accessing Access databases without any problems.
>Built an install for the app using Visual Basic 5 for VISDATA so that it
>included all the DAO dll's.  The VISDATA app runs fine, but not the other
>app written in Delphi.  Both are 32-bit.

>However, still getting the OLE error.

>Anyone have any ideas, it would be greatly appreciated.

>Thanks in advance.

Other Threads