By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

connection string to connect access database from VB

P: n/a
Hi ,
I am trying ot connect a VB application to Access database.
iam using the following connection string :

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;data source=c:\
windows\desktop\ex1.mdb;Persist Security Info=False"

it worked where the access file is in the local system

but i want to access the datbase from anotehr system, a server.

Please help in forming the connection string so taht i can connect to the
remote system connected in network.

Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Vignesharaw,

Than just change the filepath in that, all users needs to have rights for
that by the way

Access is not a database server, it is a database file.

I hope this helps?

Cor
Nov 21 '05 #2

P: n/a
Hi Cor,
Thanks for that.
But it needs the folder containing the file to be shared!
Is there any otehr way to achieve this without sharing the file?

Thanks,
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #3

P: n/a
Vignesh

Not that I know with ms-access

Sorry

Cor
Nov 21 '05 #4

P: n/a
Anyway, thanks Cor.

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #5

P: n/a
On Mon, 07 Mar 2005 11:36:13 GMT, "vigneshwaran G via DotNetMonster.com" <fo***@DotNetMonster.com>
wrote:

Hi ,
I am trying ot connect a VB application to Access database.
iam using the following connection string :

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;data source=c:\
windows\desktop\ex1.mdb;Persist Security Info=False"

it worked where the access file is in the local system

but i want to access the datbase from anotehr system, a server.

Please help in forming the connection string so taht i can connect to the
remote system connected in network.

Have you tried using a UNC path name?

\\servername\Database\db1.mdb
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #6

P: n/a
Hi Paul,

Thanks for your comment.
I am not aware of the term UNC path ...

\\servername\Database\db1.mdb

As you mentioned, Please let me know how could i find the database name in
Access in the above path..and in which tag should i include this path in
connection string.

Thanks,
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #7

P: n/a
On Thu, 10 Mar 2005 08:53:35 GMT, "vigneshwaran G via DotNetMonster.com" <fo***@DotNetMonster.com>
wrote:

Hi Paul,

Thanks for your comment.
I am not aware of the term UNC path ...

\\servername\Database\db1.mdb

As you mentioned, Please let me know how could i find the database name in
Access in the above path..and in which tag should i include this path in
connection string.

You need to create a "file share" on the other machine to the path where the database is located.
For the following example the share name is Database:

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;data
source=\\machinename\Database\ex1.mdb;Persist Security Info=False"

Of course, everyone who needs to access this database must have full permissions for the folder
(file share) where the database is located.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.