Indicates whether Jet should copy locale information when compacting a database. Jet OLEDB:Don't Copy Locale on Compact (DBPROP_JETOLEDB_COMPACT_DONTCOPYLOCALE) Jet OLEDB:Database Password (DBPROP_JETOLEDB_DATABASEPASSWORD) The first user to open the database determines the mode used while the database is open. Indicates the locking mode for this database. Jet OLEDB:Database Locking Mode (DBPROP_JETOLEDB_DATABASELOCKMODE) Indicates whether a system database should be created when creating a new data source. Jet OLEDB:Create System Database (DBPROP_JETOLEDB_CREATESYSTEMDATABASE) Indicates whether users can connect to the database. Jet OLEDB:Connection Control (DBPROP_JETOLEDB_CONNECTIONCONTROL) This value is only valid after a database connection has been established. Indicates an estimate of the amount of space, in bytes, that can be reclaimed by compacting the database. Jet OLEDB:Compact Reclaimed Space Amount (DBPROP_JETOLEDB_COMPACTFREESPACESIZE) The following table lists these properties together with the corresponding OLE DB property name in parentheses. As with all other Connection parameters, they can be set by using the Properties collection of the Connection object or as part of the connection string. The OLE DB Provider for Microsoft Jet supports several provider-specific dynamic properties in addition to those defined by ADO. The above script creates an instance of the ADO Connection object and opens a connection to the Northwind database by using an OLE DB connection string.If you are connecting to a data source provider that supports Windows authentication, you should specify Trusted_Connection=yes or Integrated Security = SSPI instead of user ID and password information in the connection string. Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Provider=.4.0 Data Source=" & _ For example, if you want to use the OLE DB provider, you should revise the Employees.asp file like this: When using an OLE DB connection, you must specify the provider name in the Provider parameter and provide the path to the Access database in the Data Source parameter. You can also connect to an Access database by using a native OLE DB provider for Microsoft Access - .4.0. The above script creates an instance of the ADO Connection object and opens a connection to the Northwind database located in the Learn_ASP folder on the C: drive by using a Microsoft Access driver.Ĭonnecting to a Microsoft Access Database Using OLE DB In the above connection string, the DRIVER parameter specifies the Microsoft Access driver, and the DBQ parameter holds the path to the Microsoft Access database file. "C:\Learn_ASP\Northwind.mdb" Set Session("Northwind_conn") = conn Set conn = Server.CreateObject("ADODB.Connection") conn.Open "DRIVER= Microsoft Access Driver (*.mdb) DBQ=" &_ If IsObject(Session("Northwind_conn")) Then Set conn = Session("Northwind_conn") You can open a data source without creating a File or System DSN by specifying the DRIVER and DBQ parameters in the connection string.įor example, if you want to use a DSN-less connection, you should revise the Employees.asp file like this:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |