Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"can't create object" 2

Status
Not open for further replies.

rickgalty

Programmer
Nov 10, 2005
32
US
Hi there. I have a VB5 database application that I've been working on for a while on my desktop, and it has been coming along ok. When I run it (uncompiled) it runs as expected.

I have now installed VB 5.0 on my laptop to work on it on the road. However, when I try to run it now, it crashes as soon as I try to get to any of the data access areas. The error message I get is :-

Run time error '429':
ActiveX component can't create object.

If I click 'debug', the line that is highlighted is:-

"Set db = OpenDatabase(App.Path & "\Employees.mdb")"

As I said, it works fine on my desktop, but not on my laptop. Both are running Windows XP Pro.

Thanks for any help.

Richard
 
Is Microsoft DAO 3.6 Object Library referenced OK, on your laptop?

And I hope you declare all DAO objects explicity like
Dim db As DAO.Database
Dim rs As DAO.Recordset

 
Both DAO360.dll and DAO350.dll are in the common files folder. Where should I look for the registry entries for them ?

I wasn't explicitly declaring the databases as DAO objects - I've just got them declared by :

Dim db as Database
Dim rs as Recordset

I wasn't aware it was advisable to do so.

Richard
 

On menu Project-->References, scroll down to find Microsoft DAO 3.6 Object Library and select the checkbox.

Propably there is a reference there for Microsoft ActiveX Data Objects 2.x Library, already selected and that s causing the trouble.
 
ActiveX Data Objects 2.x wasn't checked, but Microsoft DAO 3.51 Object library was. I checked 3.6 as well, and got an error that it was incompatible with a prior reference. I unchecked 3.51, and now instead of my 'cannot create object' error, I get "Can't open a database created with a previous version of your application
 
Undo all changes.
Keep the explicite declaration.

Can 't think of something else to help you. It is an Access 2.0 db ? Haven 't any knowledge on that.
 
The original database was written in Access 97. Would VB5 and the DAO 3.6 Library be ok with an Access XP database, because I have Office XP installed and could update the database no problem.

Richard
 

DAO is best recommended for all Access dabasses, although you could use ADO as well. But they dont share all the methods and properties, like FindFirst for DAO or the no need for .Edit and then .Update for an ADO recordset.

Of course you could upgrade the Acess97 format database to the Access 2002 format taking advantage of some extra functionality. I believe that VB5 should be ok but havent any personnal experience on that. I currently use VB6 and Accesse 2000 format.
 
No, still getting "Unable to open database created with a previous version of your application
 
See this article -
There are several things it suggests that you check, but the one that solved the problem for me was to save the following text to a .reg file and import it using RegEdit.

REGEDIT4
[HKEY_CLASSES_ROOT\Licenses\F4FC596D-DFFE-11CF-9551-00AA00A3DC45]
@="mbmabptebkjcdlgtjmskjwtsdhjbmkmwtrak"

Prior to that I unregistered and reregistered the .dll as the article suggests, which didn't work, so I don't know if combined with the above worked, or whether you can do just the above import.

Hope this helps. I've had this problem on certain machines for a long time and had given up before. Thought I'd try again and just stumbled upon this article.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top