Connect to an mdb file resource

  • Thread starter Thread starter steve.ward
  • Start date Start date
S

steve.ward

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?
 
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.aspx?scid=kb;en-us;308278
http://www.codeproject.com/vb/net/grid101.asp
http://www.codeproject.com/csharp/PersonalAddressBookWithAD.asp

The last is a C# example, but the data principles are the same.
 
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?
 
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.
 
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
 
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
 
Steve,

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

I hope this helps?

Cor
 
Back
Top