Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Networked Database

Status
Not open for further replies.

WJProctor

Programmer
Jun 20, 2003
151
0
0
GB
Hi there, done quite a bit of Database stuff in VB 6 and now in .net but never done any stuff with the Database sitting on a server and multiple machines acessing it. Does any one know of a tutorial that could help me out and get me going or know of anywhere where i could find out more about it.

Cheers

James
 
This is a generic solution for multiple client access to a database from a front-end across a net work.
1. Assume you have a database called "sample.mdb" for which you have written a front-end in vb using ADO. First place this in a shared folder [myDbShare] on your server called, myServer.

2. In all places in the VB program, where you want to access the database, you need a "Connection string". For the data source part of this string, you write, data source=\\myServer\myDbShare\sample.mdb. Data Source is only a part of the string. You should get the correct string.

3. Now if you "deploy" your front-end on the clients, the front-end can access the database assuming proper permissions are in place.
Let me know if you need help.
jkrishnaswamy
 
That great thanx. What about the problem of opening the same record at the same time, how do i get over that easily?
 
by locking the recordset. i dont know whether it can be done programatically in access itself. if not have a status field. when a recordset is being accessed change the status field to "Access". when the processing is done change the value back to "". when opening a recordset check the status and then display the record.

NOTE: This is a very dangerous method as if the sys shuts down then the status will remain "Access" forever and it will not allow u to touch the row again.

a search in this forum will yield better results...

Known is handfull, Unknown is worldfull
 
I ran into this little problem also with networked databases. My first database resided on a NT server and I had the database location mapped as the 'E' drive on our machines. Or so I thought! I found out two machines had the location mapped as 'F'. After that problem I insert a text file on the local drive with the location of the database on it and I read this file when the program first loads. I add a string to the connection string like this :

datList.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strLocation & ";Persist Security Info=False"

strLocation being the string. That way no matter what drive letter is mapped its just a simple matter of changing this text file on each client to point them to the proper database location.

Shannan
 
How do I set up Permissions? I have a database on a network, which the front-end accesses, but I always get permission errors. Can anyone help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top