access| Data | database
Tcp/ip,ado and XML are used (Microsoft XML 4.0 needs to be installed.) )。 Sub-server and client-side two parts, the server can connect multiple users simultaneously. There are a number of ways to remotely connect to an Access database, which I have answered in more detail (see the 5 methods listed below), and this example is the 3rd method (no need to use RDS or a Web server).
Several ways to connect to an Access database remotely:
1. Establish VPN (Virtual Private network), so that your computer and host connection is the same as the LAN, and then the server in the MDB file folder to share. The ADO connection is as follows:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\servername\databasefolder\database.mdb; Jet oledb:database PASSWORD=DATABASEPW; Persist Security Info=false "
2. Place the database on a Web server so that ADO or RDO can be implemented via RDS (Remote Data Service) and IIS:
If the server has ODBC DSN set up like the above, Jave:
oConn.Open "Provider=ms Remote;" & _
"Remote server=http://myservername;" & _
"Remote Provider=msdasql;" & _
"Dsn=advworks;" & _
"Uid=myusername;" & _
"Pwd=mypassword"
If the OLE DB Provider is set:
oConn.Open "Provider=ms Remote;" & _
"Remote server=http://myservername;" & _
"Remote provider=microsoft.jet.oledb.4.0;" & _
"Data Source=c:\somepath\mydb.mdb", _
"Admin", "" "
3. Write your own server program, passing the recordset through TCP/IP.
4. Use third party controls, such as ADO anywhere or udaparts rdb.
5. Using XMLHTTP
--------------------------------------
Attach remote connection to SQL Server method:
ConnStr = "Provider=SQLOLEDB.1; Network LIBRARY=DBMSSOCN; Persist Security info=true; User Id=username; password=password;initial catalog= remote database name; Data source=203.129.92.1 "