471,339 Members | 1,258 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,339 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 2070

<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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Kimo | last post: by
6 posts views Thread by steve.ward | last post: by
reply views Thread by George L. Sexton | last post: by
1 post views Thread by perjorgen | last post: by
6 posts views Thread by Damodhar | last post: by

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.