Detailed description of the Remote Access Database call Method

Source: Internet
Author: User
Tags dsn

If TCP/IP is used, Microsoft XML 4.0 must be installed for ADO and XML .). It is divided into two parts: server and client. The server can be connected to multiple users at the same time. There are many ways to remotely connect to the Access database. I have already answered the questions in detail and see the five methods listed below ), I do not need to use RDS or Web servers for the 3rd methods in this example ).

Several Methods for remotely connecting to the access database:

1. Create a VPN (Virtual Private Network) so that your computer and host can be connected to the LAN, and then share the Folder where the mdb file in the server is located. 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. put the Database on the Web Server, so that ADO or RDO can be implemented through RDSRemote Data Service) and IIS: if the Server sets odbc dsn as described in Jave: reference content is as follows:

oConn.Open "Provider=MS Remote;" & _  "Remote Server=http://myServerName;" & _ "Remote Provider=MSDASQL;" & _ "DSN=AdvWorks;" & _ "Uid=myUsername;" & _ "Pwd=myPassword"

If you set an ole db Provider, the reference content is as follows:

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 and pass the Recordset through TCP/IP.

4. Use third-party controls, such as ADO Anywhere or UDAParts RDB.

5. Use XMLHTTP

The following describes how to remotely connect to SQL Server:

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"

(

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.