472,808 Members | 3,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Connect to an mdb file resource

I have added an access mdb file as a resource to my VB.Net windows app.

Is there a way of reading and or writing to it without first steaming
in out and saving it as a file on the harddrive?

Jul 21 '05 #1
6 2130

<st********@sympatico.ca> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have added an access mdb file as a resource to my VB.Net windows app.

Is there a way of reading and or writing to it without first steaming
in out and saving it as a file on the harddrive?

Assuming you want to access data stored in the database, you're going to
need to connect to it logically, employing ADO.NET technologies, no treating
it like a generic file.
If you are unfamiliar with ADO.NET, here are some places to get the
information you need.

http://msdn.microsoft.com/data/default.aspx
http://support.microsoft.com/default...b;en-us;308278
http://www.codeproject.com/vb/net/grid101.asp
http://www.codeproject.com/csharp/Pe...BookWithAD.asp

The last is a C# example, but the data principles are the same.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #2
I'm very familiar with ADO.Net. But my experiance has always been with
the connections to an external DB.

My situation is that the my client has an existing Access db that they
want to embed in a .Net application as a resource and then access its
contents without streaming it to the hard drive

So, my problem is how do I set the Data Source property of the
connection string to point to it?

Jul 21 '05 #3

<st********@sympatico.ca> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I'm very familiar with ADO.Net. But my experiance has always been with
the connections to an external DB.

My situation is that the my client has an existing Access db that they
want to embed in a .Net application as a resource and then access its
contents without streaming it to the hard drive

So, my problem is how do I set the Data Source property of the
connection string to point to it?

Sorry for misinterpreting your question. I'm not aware of any way to connect
to an Access database without referencing the physical file, but someone
else may. Let's hope for other readers/posters.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #4
Steve,

I don't understand the problem, from the messages which are already there, I
would say you need to set the connection string (and use OleDb). The only
difference with other database servers is, that you connect it to a fixed
file, because it is not acting as a real databaseserver in the network
however as a database system. (for the rest almost everything is the same)..

http:\\www.connectionstrings.com

When I misunderstand you please reply

Cor
Jul 21 '05 #5
Well the problem is that the mdb file is embedded in the executable as
a resource. So I don't now how to point the connection string to it
since there is not physical file.
Basicly what do I enter for the Data Source?

Thanks,
Steve

Jul 21 '05 #6
Steve,

An access database is always somewhere on disk, it cannot be embedded only
in an apllication.

I hope this helps?

Cor
Jul 21 '05 #7

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

Similar topics

4
by: Kimo | last post by:
Hi I develope an application in VB.Net. I want to connect to foxpro database. I use the following code Tr Dim cnn As New OleDbConnectio cnn.ConnectionString = "Provider=VFPOLEDB.1;" + "Data...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
6
by: steve.ward | last post by:
I have added an access mdb file as a resource to my VB.Net windows app. Is there a way of reading and or writing to it without first steaming in out and saving it as a file on the harddrive?
0
by: George L. Sexton | last post by:
MH Software, Inc. is pleased to announce the release of version 3.2.11 of its Connect Daily web calendar software. This is primarily a small feature release with a few bug fixes. Topics in this...
1
by: perjorgen | last post by:
Hi, My asp.net can't connect to any sql database when running 1.1 I can connect to databases if I make a windows application and if if I run asp.net 2.0 Other computers have no problem...
4
by: d3vkit | last post by:
Okay so I am at a loss here. I have a website that I've previously had no trouble connecting to the mysql DB on. I have an include to a connect file with the relevant connection info, and it was...
3
by: arasub | last post by:
ep 20, 2007 11:25:57 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found...
0
by: db2admin | last post by:
Hi, I am getting error when exporting data from mainframe using db2 connect while i am on db2 on linux. Here is what error looks like...
6
by: Damodhar | last post by:
hi how can i connect more then one database in the same project.
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.