The string cui set connecting various databases through ADO (i)

Source: Internet
Author: User
Tags dsn odbc ole sybase
In the process of network programming, ADO (Activex Data Object) programming is often indispensable work, especially the development of e-commerce sites. Now that you're talking about ADO data objects, you can simply introduce ADO data objects and their functions. There are seven separate objects for ADO data objects, namely, connection objects (Connection), Recordset objects (recordsets), Domain objects (field), Command objects (commands), Parameter objects (Parameter), Attribute objects (property) and Error objects (errors). features see Appendix 1.
ADO Data objects are used to connect to a database in two ways, ODBC and OLE DB, respectively, and the following are examples of connecting to a database in both ways.
The first type: ODBC dsn-less connections
ODBC Driver for Access
ODBC Driver for DBASE
ODBC Driver for Excel
ODBC Driver for MySQL
ODBC Driver for Oracle
ODBC Driver for Paradox
ODBC Driver for SQL Server
ODBC Driver for Sybase
ODBC Driver for Sybase SQL Anywhere
ODBC Driver for Text
ODBC Driver for Teradata
ODBC Driver for Visual FoxPro
The second type: OLE DB Data Provider connections
OLE DB Provider for Active Directory Service
OLE DB Provider for DB2
Old DB Provider for Internet Publishing
OLE DB Provider for Index Server
OLE DB Provider for Microsoft Jet
OLE DB Provider for ODBC Databases
OLE DB Provider for Oracle (from Microsoft)
OLE DB Provider for Oracle (from Oracle)
OLE DB Provider for simple Provider
OLE DB Provider for SQL Server
First, I'll start with ODBC DSN to access the database, to complete this work, you must first through the Control Panel-Administrative Tools-ODBC data source to establish a data source name, for example, called Testdata_resoure.
1 connection through System data source (systems DSN)
<%
Dim Oconn,strconn
Set oconn=server.createobject ("ADODB. Connection ")
Strconn= "Dsn=testdata_resoure" & _
"Uid=adminaccount;" & _
"Pwd=password;
oConn.Open strconn
%>
2 connection via file data source (Files DSN)
<%
Dim Oconn,strconn
Set oconn=server.createobject ("ADODB. Connection ")
Strconn= "Filedsn=c:somepathmydb.dsn" & _

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.