how to : Multiple OleDbConnection(s) use same connection string

  • Thread starter Thread starter Abdolhosein Vakilzadeh Ebrahimi
  • Start date Start date
A

Abdolhosein Vakilzadeh Ebrahimi

Hi:

I have a big database project which I SHOULD use ms access databases.
I have my OleDbConnections through my program.
But the problem is access is file based instead of DataSource, so I
should define in all connections a file path, which is variable during
runtime.
I used OleDbCnnection since I based my proj on VS.NET 2002, so I can
not replace it with ODBCConnecion.

Is there any idea?

Your help is appreciated.

A.V.Ebrahimi
(e-mail address removed)
 
hi Abdolhosein,

Last I have also a ms-access based databese project. I keep the path of
the mdb files in registry. It's really efficient and easy to maintenance.
Even when you are trying to find the file in another computer in the
network, you simply look at the registry and see where the mdbs are located.

Hope this helps.
Ozgur.
 
No. Just fix a place in registry and put the path of file(s) there. Do this
in all machines. Everytime you are constructing your connection string look
at that registry place and use the file path. When you are trying to acess a
mdb file in another computer look at that computers registry and than
construct your connection string.

Ozgur.
 
Back
Top