469,306 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

connection string to connect access database from VB

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
7 18661
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
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
Vignesh

Not that I know with ms-access

Sorry

Cor
Nov 21 '05 #4
Anyway, thanks Cor.

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #5
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
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
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.

Similar topics

16 posts views Thread by peshekeedweller | last post: by
1 post views Thread by Chris Love | last post: by
3 posts views Thread by Greg Strong | last post: by
7 posts views Thread by Bill Nguyen | last post: by
13 posts views Thread by Jennifer.Berube | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.