Accessing the database
ActiveX Data Objects (ADO) is an easy-to-use and extensible addition of database access to
Technology for WEB pages. You can use ADO to write compact and concise scripts to connect to Open Databa
SE Connectivity (ODBC)-compliant databases and OLE DB-compliant data sources. If you are a
Script writers who have a certain understanding of database connections, you will find that the ADO command statements are not complex
and easy to master. Similarly, if you are an experienced database programmer, you will correctly
Understand the advanced language-independent and query-processing functions of ADO.
Creating an ODBC DSN file
Before you create a database script, you must provide a way to locate, identify, and communicate with the database
。 The database driver uses data Source Name (DSN) to locate and identify specific ODBC compatible
Database to pass information from the WEB application to the database. Typically, a DSN contains a database with
Placement, user security, and location information, and you can get the Windows NT registry key or the text file's
Form.
With ODBC, you can select the type of DSN you want to create: User, System, or file. Users and
The system DSN is stored in the Windows NT registry. System DSN allows all users to log on to a specific
Server to access the database, and the user DSN uses the appropriate security credentials to limit the database to the special
Set the user's connection. A file DSN is used to get a table from a text file, providing access to multiple users,
and by copying DSN files, you can easily move from one server to another. Due to
Reason, the example in this topic will use a file DSN.
You can create a DSN-based text by opening Control Panel on the Windows Start menu
Thing Double-click the ODBC icon, and then select the File DSN property page, clicking Add, and selecting the number
According to the library driver, then click Next. Follow the instructions below to configure your database for soft
The DSN for the piece.
To configure a file DSN for a Microsoft Access database
In the Create New Data Source dialog box, select Microsoft Access Driver from the list box, and then
And then click Next.
Type your DSN file name, and then click Next.
Click Finish to create the data source.
In the ODBC Microsoft Access 97 Setup dialog box, click Select. Select Mi
Crosoft the Access database file (*.mdb), and then click OK.
Note For performance and reliability reasons, we strongly recommend that you use the client-server database engine
"Configures data driven by such a Web application that must meet 10
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