Recommended: Frequently Asked Questions in the Development of Dynamic Web Production Technology ASP The following is the quoted content: bgcolor=#f7f7f7> <tr> <td style=LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word&
ODBC (Open Database Interconnect): It is an early database interface technology introduced by Microsoft. It is actually the predecessor of ADO. Early database connections were very difficult. The format of each database is different, and developers must have a deep understanding of the underlying APIs of each database they develop. Therefore, a common API that can handle various databases came into being. That is, the current ODBC (Open Database Connectivity), which is an early product of people creating a common API. There are many types of databases that comply with this standard and are called ODBC-compatible databases.
OLEDB (Object Link and Embed Database) is located between the ODBC layer and the application. In your ASP page, ADO is an application located above OLEDB. Your ADO calls are sent to OLEDB and then handed over to ODBC for processing. . You can connect directly to the OLEDB layer, and if you do this, you will see an improvement in performance of server-side cursors (the default cursor of recordset and the most commonly used cursor).
Use odbc to connect to the database:
There are three types of dsns in odbc, and their differences are very simple: user dsn can only be used for this user. The only difference between system dsn and file dsn is that the connection information is stored in different locations: system dsn is stored in the odbc storage area, while file dsn is placed in a text file.
I won’t talk about their creation methods.
When using them in asp, the writing is as follows:
A.sql server:
Use system dsn: connstr=DSN=dsnname; UID=xx; PWD=xxx; DATABASE=dbname
Use file dsn: connstr=FILEDSN=xx;UID=xx; PWD=xxx; DATABASE=dbname
You can also use a connection string (so that you don't need to create dsn):
connstr=DRIVER={SQL SERVER};SERVER=servername;UID=xx;PWD=xxx
B.access:
Use system dsn: connstr=DSN=dsnname
(Or: connstr=DSN=dsnname;UID=xx;PWD=xxx)
Use file dsn: connstr=FILEDSN=xx
You can also use a connection string (so that you don't need to create dsn):
connstr=DRIVER={Microsoft Access Driver};DBQ=d:/abc/abc.mdb
Use oledb to connect to the database:
| The following is the quoted content: A.sql server: connstr=PROVIDER=SQLOLEDB; DATA SOURCE=servername;UID=xx;PWD=xxx;DATABASE=dbname B.access: connstr=PROVICER=MICROSOFT.JET.OLEDB.4.0; DATA SOURCE=c:/abc/abc.mdb |
It is worth noting that OLE DB's compatibility with ODBC allows OLE DB to access existing ODBC data sources. Its advantages are obvious. Since ODBC is more commonly used than OLE DB, there are correspondingly more ODBC drivers available than OLE DB. This does not necessarily require OLE DB drivers to immediately access the original data system.
The provider is located in the OLE DB layer, while the driver is located in the ODBC layer. If you want to use an ODBC data source, you need to use an OLE DB provider for ODBC, which will then use the corresponding ODBC driver. If you do not need to use an ODBC data source, you can use the corresponding OLE DB providers, which are often called native providers.
It is clear that using an ODBC provider means an additional layer is needed. Therefore, when accessing the same data, the OLE DB provider for ODBC may be a little slower than the local OLE DB provider.
Share: Abs Atn Cos, common mathematical functions, etc., detailed explanations [Name] Abs [Category] Mathematical Function [Prototype] Abs(number) [Parameter] Required. Number parameter is any valid numeric expression [return value] of the same number [exception/error] None [