connect remote Access database

W

wind

Hello

I want to ask how to connect a vb.net window client application to a remote
MS Access databae which is located on a server?
How to set the connection string in order to do so?

Thank you
 
C

Cor Ligthert [MVP]

Chase,

You will have to create a shared folder and set that on every individual
computer (and give those using that rights in that shared folder)

An Jet Database is not a database server it is more a databasefile.

I hope this helps,

Cor
 
F

Frans Bouma [C# MVP]

wind said:
Hello

I want to ask how to connect a vb.net window client application to a
remote MS Access databae which is located on a server?
How to set the connection string in order to do so?

MS Access doesn't have a 'server' service, it's just a driver which
accesses a file. So if you want to access an .mdb file on a server, you
have to share that .mdb file using a shared folder, map that folder to
a drive letter (or use \\servername\folder\mydatabase.mdb) and then use
that drive + foldername to specify where the .mdb file is located.

Frans

--
 
P

Paul Clement

¤ Hello
¤
¤ I want to ask how to connect a vb.net window client application to a remote
¤ MS Access databae which is located on a server?
¤ How to set the connection string in order to do so?

It's no different when accessing a file on a network share. Just use the UNC naming convention for
the path to the file as Frans mentioned.

Also keep in mind that all users accessing the database will require full permissions to the folder
where the database file is located.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

wind

Thanks all

But I have a problem, that is, after I mapped the drive to local pc and
access it, every time I read a record, it will automatically download the
whole .mdb file once. And every time I save a record, it will automatically
upload the whole .mdb file once. This is a big big problem. So I don't know
how to do.
 
C

Cor Ligthert [MVP]

Wind

You say up and download, do you mean that you want to do from a webpage
(aspx). That you can forget if it is outside your domain.

Cor
 
W

wind

Cor

no. i mean from a window client application. After i mapped the local drive
to a remote server, i can set the connect string as "Data
Source=\\folder\xxx.mdb". But it doesn't like i map to a local area network,
it need to upload and download the whole file when i read and save a record
everytime.
Someone said I can only setup a VPN in order to prevent this problem, is it
correct?
And will it be the problem that the server is only a FTP server?

Thanks
Wind
 
F

Frans Bouma [C# MVP]

wind said:
Cor

no. i mean from a window client application. After i mapped the local
drive to a remote server, i can set the connect string as "Data
Source=\\folder\xxx.mdb". But it doesn't like i map to a local area
network, it need to upload and download the whole file when i read
and save a record everytime.
Someone said I can only setup a VPN in order to prevent this problem,
is it correct?
And will it be the problem that the server is only a FTP server?

The driver for access, the code that actually does the 'db logic' is
running on the client pc. The data is in a file, and it reads the
'file' to be able to perform the db operations. If you don't want that,
the only option you have is to create a service on the server which
performs the db actions and sends the results to the client. This is
easily done using remoting or by creating a webservice.

FB
Thanks
Wind


--
 
C

Cor Ligthert [MVP]

Wind,

I agree with Frans where I would because it simplicity go for the
webservice.

Your alternative is the SQL Server Express, be aware that it is limited in
use and that it his hard to maintenance as databaseserver withouth the SQL
full tools. (I saw that there is an upcomming tool for that on this page)

http://msdn.microsoft.com/sql/express/

I hope this helps,

Cor
 
W

wind

But I have finished coding... If i use remoting or webservice as FB mention,
do i need to do much changes? I have no idea what they are.

Thanks
Wind
 
P

Paul Clement

¤ Thanks all
¤
¤ But I have a problem, that is, after I mapped the drive to local pc and
¤ access it, every time I read a record, it will automatically download the
¤ whole .mdb file once. And every time I save a record, it will automatically
¤ upload the whole .mdb file once. This is a big big problem. So I don't know
¤ how to do.
¤

First, I don't believe it's necessary to map a drive letter to the path, unless it's for
establishing credentials with the remote resource.

Second, the .mdb does not need to be downloaded. You can access it directly over the network from
the client. You need to make certain that you have full permissions to the folder resource.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

wind

Could you please give me a sample of the connection string? I really dont
know how to set. My server is a Linux server with user name and password.
Thz
 
P

Paul Clement

¤ Could you please give me a sample of the connection string? I really dont
¤ know how to set. My server is a Linux server with user name and password.
¤ Thz
¤

I've never tried Linux before but the syntax for network resources is below:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Sharename\foldername\filename.mdb;"

And like I mentioned the user that is logged on to the client must have full access to the folder
where the database file is located.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

wind

My server is a FTP server, is it also ok? Do I need to change to other kind
of server?
And how to write the user name and password in the connection string?

Thank you
 
P

Paul Clement

¤ My server is a FTP server, is it also ok? Do I need to change to other kind
¤ of server?
¤ And how to write the user name and password in the connection string?
¤

If you're accessing via FTP or HTTP that's a completely different issue. Do you have direct access
to this resource through the network or do you have to work through FTP or HTTP?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
P

Paul Clement

¤ what is mean by "direct access to the resource through network"?
¤

By direct access I mean can you use a conventional connection string using a network resource (like
the example I provided in a previous post):

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Sharename\foldername\filename.mdb;"


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

wind

Then what kind of server I can use other than FTP and HTTP? coz I dont
familar with server setting. Thz.
 
P

Paul Clement

¤ Then what kind of server I can use other than FTP and HTTP? coz I dont
¤ familar with server setting. Thz.
¤

A networked file server is about the only configuration that will work for you when using a
Microsoft Access database.

If the file cannot be accessed directly from a networked file server then you would have to build a
web service to run on your FTP or HTTP server which could then be accessed from your client
application.

Other technologies you could try, although they are no longer supported by Microsoft and require a
Windows based server, are RDS and MS Remote. These will allow you to access files over HTTP:

http://www.carlprothman.net/Default.aspx?tabid=93
http://msdn.microsoft.com/library/d...0/htm/mdmscrdsprogrammingmodelwithobjects.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top