Re: implement client-server
I don't see the point of using DSN's, it is much less hassle to use DSN-less, as you do not need to set up a DSN on each PC that your program may be run on.
In order to have an Access database on a server (or any remote computer) you need to store it in a shared folder on that server, with permissions given to the users to modify files in that folder.
You can then use a connection string which maps to that location. Here is an ADO sample:
VB Code:
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strSQL As String
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=[U]\servername\shared folder name\mydb.mdb[/U];User Id=admin;Password=;"
cnn.Open
Set rst = New ADODB.Recordset
strSQL = "SELECT * FROM table1"
rst.Open strSQL, cnn, adOpenKeyset, adLockPessimistic, adCmdText
rst.Close
Set rst = Nothing
cnn.Close
Set cnn = Nothing