473,573 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ConnectionS tring = "Provider=Micro soft.Jet.OLEDB. 4.0;data source=c:\
windows\desktop \ex1.mdb;Persis t 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 18944
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, "vigneshwar an G via DotNetMonster.c om" <fo***@DotNetMo nster.com>
wrote:

¤ Hi ,
¤ I am trying ot connect a VB application to Access database.
¤ iam using the following connection string :
¤
¤ con.ConnectionS tring = "Provider=Micro soft.Jet.OLEDB. 4.0;data source=c:\
¤ windows\desktop \ex1.mdb;Persis t 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\Da tabase\db1.mdb
Paul ~~~ pc******@amerit ech.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\Da tabase\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, "vigneshwar an G via DotNetMonster.c om" <fo***@DotNetMo nster.com>
wrote:

¤ Hi Paul,
¤
¤ Thanks for your comment.
¤ I am not aware of the term UNC path ...
¤
¤ \\servername\Da tabase\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.ConnectionS tring = "Provider=Micro soft.Jet.OLEDB. 4.0;data
source=\\machin ename\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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1593
by: Barb | last post by:
Hello again, I had posted over the past couple of days regarding a connection issue I was having to my production database from an Access project. I sorted that out by using integrated Windows login credentials instead of the "sa" account and was able to connect to my production database from the ADP running on my machine using my user...
16
2297
by: peshekeedweller | last post by:
Using asp.net 1.1. vb.net 2003. I am trying to connect to a remote sql server 2000 on a virtual machine running windows 2000 server. I can connect through the server explorer in visual studio, but cannot connect through code. I have done it before and can not do it now; I don't know what changed. (I also cannot connect to local Access...
1
1888
by: Chris Love | last post by:
I have already asked this, but no one seems to know the answer. Here is the timeline. I wanted to use the membership/roles functionality in a site. I got all sorts of errors trying to get this setup on the site through the admin interface. So I yanked it out of the application since it did not work. Now everytime I load the site after...
3
12935
by: Greg Strong | last post by:
Hello All, Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? I'm doing some testing with using Access as a front-end to Oracle 10g Express edition. When the user ID and password is entered on a form and after a successful connection it seems Access doesn't change the connection. Even if...
8
9618
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query work from
10
5773
by: cleo | last post by:
I am migrating from VB6/Access to Visual Basic and SQL Express. I have success writing test code on my local machine and am now setting up tests for deployment to a server. I have installed SQL Express on a Windows 2003 Server. I can connect and create databases on the Remote Server from my local machine using SQL Management Express, so I...
7
7470
by: Bill Nguyen | last post by:
I have this connection string using ODBC DSN Dim FactorJaco As String = "dsn=jaco;catalog=factor;uid=user;pwd=passord" This requires an ODBC DSN (jaco) at every client PC. I need to use DSN-less connection for terminal server setup. Any help is greatly appreciated.
13
2832
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I don't want to use DSN just a connection string...help? function GetConnection() const DSN = "membershipdb" const UID = "webuser"
2
3258
by: Orit | last post by:
Hello . Please find below my questions - I hope some of the ASP.NET experts of this forum will answer to those beginner's questions : My Web site should be able to work with either SQL Server or Access database as following : It will connect first to the Master database (SQL or Access, connection String of this database should be read...
6
8147
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru...
0
7681
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8000
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8194
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5578
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3729
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2190
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1294
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1034
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.