opening an instance of an Access database

G

Guest

Hello,
I wish to open an instance of an access database from within my
vb.net code

I have the following code

Dim ObjAccess as object
Dim strdbname as string = "c:\\reports.mdb"

In vb6 I would say

objAccess = Createobject(strdbname,"access.application")

How would I do this in visual basic.net, surely it can't be that different.
any help would be appreciated.

Regards
Robert Smith
 
G

Greg Burns

Dim strdbname as string = "c:\\reports.mdb"
VB does not use escape characters like C languages do
surely it can't be that different.
:^)

Do you want to read/write to the database's tables? Or are you trying to do
something with the Access object model? Like display a report or something?

Greg
 
P

Paul Clement

¤ Hello,
¤ I wish to open an instance of an access database from within my
¤ vb.net code
¤
¤ I have the following code
¤
¤ Dim ObjAccess as object
¤ Dim strdbname as string = "c:\\reports.mdb"
¤
¤ In vb6 I would say
¤
¤ objAccess = Createobject(strdbname,"access.application")
¤
¤ How would I do this in visual basic.net, surely it can't be that different.
¤ any help would be appreciated.


It's actually not very different than when using Classic VB:

ACC: Using Microsoft Access as an Automation Server
http://support.microsoft.com/default.aspx?scid=kb;EN-US;147816


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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