VBA7 Database connections

VBA7 Database connections

Anonymous
Not applicable
1,168 Views
4 Replies
Message 1 of 5

VBA7 Database connections

Anonymous
Not applicable

I have just installed Inventor 2014 and I am working through some vba issues. Can anyone tell me how to work with database connections? "DBEngine.Workspaces(0).OpenDatabase" seems to throw an error now. Not quite sure how to work it out. Any suggestions?

0 Likes
1,169 Views
4 Replies
Replies (4)
Message 2 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi,

Are you working on a 64 bit machine?
In that case the following article should be of help, since using Microsoft DB component from AutoCAD's 64 bit VBA environment (or any other 64 bit process for that matter) has the same issues: http://forums.autodesk.com/t5/NET/32bit-AND-64bit-environment-database-connectivity/td-p/2925668

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks Adam for pointing me in the right direction.

0 Likes
Message 4 of 5

Anonymous
Not applicable

My work around looks to be to use excel. From within Inventor I open and start excel and populate the job number. Then using 3.6 DAO Object Library in Excel I can search the Access data base and populate the excel sheet and then automatically populate back to the vba in Inventor. A little akward, but better than nothing.

0 Likes
Message 5 of 5

ekinsb
Alumni
Alumni

Try installing the 64-bit version of this component.  This should allow you to connect to an Access database.  One word of warning though is that if you have any 32-bit applications you're using that also need to use Access, they will be broken.  Microsoft doesn't support both the 32 and 64-bit versions of the component to be installed at the same time.

 

http://www.microsoft.com/en-us/download/details.aspx?id=13255


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes