473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

opening an instance of an Access database

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
Nov 21 '05 #1
2 1113
>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
"Robert Smith" <Ro*********@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com... 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

Nov 21 '05 #2
On Fri, 6 Aug 2004 10:43:01 -0700, Robert Smith <Ro*********@discussions.microsoft.com> wrote:

¤ 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...b;EN-US;147816
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike Wilson | last post by:
Is there a way to open an OLE DB database from within Access? I would like to use the Access GUI with its table and query explorer to examine a database only available through an OLEDB provider...
11
by: MLH | last post by:
My alzheimer moments occur with greater frequency these days, it seems. I sometimes open Access and the same dbase in a second instance and work on items. If I modify a form and discover later...
4
by: CliffKing | last post by:
I am trying to use Windows Task Scheduler to run a batch file for an already open MS Access database. Below is the syntax to the batch file: Batch file: DailySalesExport.bat REM This runs the...
1
by: CJJ | last post by:
hi Folks, I am opening my access database file (Access 2003) from a C# application. The connection string specifies mode=Share Exclusive The intent is that the application have exclusive...
2
by: jritacco | last post by:
I have a user that is somehow managing to open multiple copies of a single Access database. We are using Access 2003 and everything I have tried makes it IMPOSSIBLE to open the same database more...
2
by: Wayne | last post by:
I'm having a problem that I've seen before on XP and am now seeing on Vista. It started yesterday and I can't associate it with anything that I've done to the PC, like installing software etc. I...
25
by: John | last post by:
Hi In my vb.net app I am trying to open a db via DAO as below; Imports dao Dim dbSynch As dao.Database dbSynch = DBEngine(0).OpenDatabase("C:\MYDB.MDB")
0
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
16
by: Phil Stanton | last post by:
I have a form with a button which is supposed to open an Excel file (With lots of Macros /VBA) in it. The Excel file gets it's data from the Access program Here is the code Private Sub...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.