Read Access-files from VBA

D

Diane

How do I read a table in an Access .mdb-file from Visio VBA?

An example showing how to create the Access object and what reference I need
to set would be nice.
 
A

Al Edlund

regarding reading the record see previous post 'select database record in
vba'. regarding creating the access object, could you explain?

al
 
D

Diane

I meant that normally when accessing another application from VBA, you need
to make a statement like (in this case to open Excel)

Set XL = CreateObject("Excel.Application")

and then work your way through the various objects. And it is all about
knowing the right objects and their properties - so a working example would
be nice. The sample code you refer to below uses a somehow unfamiliar
"Provider" approach - and I think there's another way through the objects of
access.
 
A

Al Edlund

it is my understanding that M$ has gone through several iterations on
'generalizing' its interfaces to database access. First major one was DAO,
second was ADO, and now ADO.NET. The reason for the generalizing in the form
of 'providers' was so that a solution could be pretty much independent of
the database underneath (assuming a little care is taken). This approach has
worked for me in a Visio application that had to look at both Access and SQL
server simultaneously (can you guess I was working with AD&L structures). I
believe there is a shortcut similar to what you have shown, I just haven't
used it....
Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top