About Jet DB connecting strings and encrypted strings

xiaoxiao2021-03-06  30

Author: cg1 Taken: access911.net Edit: cg1

Access database adds three kinds of three kinds of Access XP as an example

1, Tools -> Security -> Encryption / Decryption Database, no changes in the way

2, Tools -> Security -> Set the database password, turn on the password 1 to open

"Provider = microsoft.jet.OLEDb.4.0; data source = c: /1.mdb; user ID = admin; password =; jet oledb: Database password = 1"

You can also use

"Provider = microsoft.jet.OLEDb.4.0; data source = c: /1.mdb; user ID = 'admin'; password =; jet oledb: Database password = '1'"

3, Tools -> Security -> User Group and Permissions .... User named admin Password to the RR user group file as c: /system.mdw, need to use

"Provider = microsoft.jet.OLEDb.4.0; data source = c: /1.mdb; user ID = admin; password = rr; jet oledb: database password = 1; Jet OLEDB: System Database = C: /System.mdw "

You can also use

"Provider = microsoft.jet.OLEDb.4.0; data source = c: /1.mdb; user ID = 'admin'; password = 'rr'; Jet OLEDB: Database Password = '1'; Jet OLEDB: System Database = C: /system.mdw "

If you share an access database on a local area, you can change the absolute path to "// Computer Name / Shared Directory Name / File Name. MDB", such as

"Provider = microsoft.jet.OLEDb.4.0; data source = // access911 / floder1 / 1.mdb; user ID = 'admin'; password = 'rr'; Jet OLEDB: Database Password = '1'; Jet OLEDB: System Database = // access911 / floder1 / system.mdw "

reference:

OLE DB Provider for Microsoft Jet OLE DB Provider for Microsoft JET allows ADO to access Microsoft Jet databases. Connection string parameters To connect this provider, set the Provider parameter of the Connectionstring property to: Microsoft.jet.OleDb.4.0 Read the Provider property will also return this string. Typical Connection Strings This provider's typical connection string is: "Provider = microsoft.jet.Oledb.4.0; data source = databaseename; user ID = username; password = userpassword;" it contains the following keywords:

Keyword Description Provider specifies the OLE DB Provider for Microsoft Jet. Data Source Specifies the database path and file name (for example, C: /NorthWind.mdb). User ID Specifies the user name. If this key is not specified, the string "admin" is used by default. Password Specifies the user password. If this key is not specified, an empty string ("") is used by default. The provider's unique connection parameters In addition to the dynamic properties of the ADO definition, OLE DB Provider for Microsoft Jet also supports several providers unique dynamic properties. Like all other Connection parameters, these parameters can be set via the Properties collection of the Connection object or as part of the connection string. The following table lists these properties, and the corresponding OLE DB attribute name is in parentheses.

Parameter Description JET OLEDB: Compact Reclaimed Space Amount (dbprop_jetoledb_compactfreespace "Indicates the estimation byte number of spaces, can be reclaimed by compressed databases. This value is only valid after establishing a database connection. Jet OLEDB: Connection Control (dbprop_jetoledb_connectionControl) Indicates if the user can connect to the database. Jet OLEDB: CREATE SYSTEM DATABASE (dbprop_jetoledb_createsystemDatabase) Indicates whether the system database is created when you create a new data source. Jet OLEDB: Database Locking Mode (dbprop_jetoledb_databaselockmode) Indicates the lock mode of this database. The first user used to open the database determine the mode used when the database is opened. Jet OLEDB: Database Password (dbprop_jetoledb_databasepassword) Indicates the database password. Jet OLEDB: DON 'TOPY LOCALE ON Compact (dbprop_jetoledb_compact_dontcopy) Indicates whether JET is replicated when the data is compressed. Jet OLEDB: Encrypt Database (dbprop_jetoledb_encryptdatabase) Indicates whether the compressed database is to be encrypted. If this property is not set, the procedure is also encrypted, the compressed database will be encrypted. JET OLEDB: Engine Type (dbprop_jetoledb_engine) Indicates the storage engine for accessing the current data store. Jet OLEDB: Exclusive async delay (dbprop_jetoledb_exclusivenessasyncdelay) Indicates that the JET number of asynchronous writes of the disk can be delayed when the database is opened in exclusive mode. This property can be ignored unless Jet OLEDB: FLUSH Transaction Timeout is set to 0. Jet OLEDB: Flush Transaction Timeout (dbprop_jetoledb_flushtransactiontimeout) indicates that the cache is truly written before the disk is truly written before the disk waits. This setting covers the value of JET OLEDB: Shared Async Delay and Jet OLEDB: Exclusive async delay. Jet OLEDB: Global Bulk Transactions (dbprop_jetoledb_globals) Indicates whether SQL is handling a lot of transactions. Jet OLEDB: Global Partial Bulk OPS (dbprop_jetoledb_globalbulkpartial) indicates the password used to open the database. Jet OLEDB: Implicit Commit Sync (dbprop_jetoledb_implicitCommitsync) Indicates that the changes made to internal implicit transactions are written in synchronous mode or asynchronous mode. Jet OLEDB: LOCK DELAY (dbprop_jetoledb_lockdelay) Indicates that the number of milliseconds waiting before attempting again after the last attempt to get the failed failure. Jet OLEDB: LOCK RETRY (dbprop_jetoledb_lockretry) Indicates the number of repetitions attempt to access the lock page. Jet OLEDB: MAX BUFFER SIZE (DBProp_jetoledb_maxbuffers) Indicates that the maximum amount of memory (in kilobytes) can be used before the JET can be used before the change is started to refresh the disk. Jet OLEDB: MAX LOCKS Per File (dbprop_jetoledb_maxlocksperfile) indicates the maximum number of locks that JET can set the database.

The default is 9500. Jet OLEDB: New Database Password (dbprop_jetoledb_newdatabase) indicates the new password set by this database. The old password is stored in Jet OLEDB: Database Password. Jet OLEDB: ODBC Command Time Out (dbprop_jetoledb_odbccommandtime "indicates the number of milliseconds before the remote ODBC query timeout. Jet OLEDB: Page Locks To Table Lock (dbprop_jetoledb_pagelockstotablelock) Indicates that the number of pages that need to be locked inside the transaction before the Jet tried to lock the lock to the table lock. If this value is 0, it will not be lifted. Jet OLEDB: Page Timeout (DBProp_jetoledb_pagetimeout) Indicates that the JET waits for milliseconds before checking the cache compared to the database file. JET OLEDB: Recycle long-valued pages (dbprop_jetoledb_recyclelongvaluepages) indicates whether JET should be enforced when it is released when the BLOB page is released. Jet OLEDB: Registry Path (dbprop_jetoledb_regpath) Indicates the Windows Registry Key to include the Jet database engine value. JET OLEDB: RESET ISAM Stats (dbprop_jetoledb_resetisamstats) Indicates whether RECORDSET dbschema_jetoledb_isamstats should reset its performance counter after returning performance information. JET OLEDB: Shared Async DELAY (DBProp_jetoledb_shaedasyncdelay) Indicates that the JET to be a maximum millisecond number of asynchronous writes of the disk when the database is turned on in multi-user mode. Jet OLEDB: System Database (dbprop_jetoledb_sysdbpath) Indicates the path and file name of the workgroup information file (system database). JET OLEDB: Transaction Commit Mode (dbprop_jetoledb_txncommitmode) Indicates that the transaction is synchronized or asynchronous to write data. Jet OLEDB: User Commit Sync (dbprop_jetoledb_usercommitsync) Indicates that changes made to the transaction are written in synchronous or asynchronous mode. The provider's unique Recordset and Command Properties JET providers also support multiple providers unique RECORDSET and Command properties. These properties can be accessed and set up with the Properties collection of the Recordset or Command object. The name of the ADO attribute name is listed in the table, which is the name of the corresponding OLE DB attribute.

Property Name Description JET OLEDB: BULK Transactions indicates whether the SQL is handled a lot. Due to resource delays, it may fail when processing a lot of operation. Jet OLEDB: Enable Fat Cursors (dbprop_jetoledb_enablefatcursor) Indicates whether JET should cache multiple rows when the recording set of the remote row source is. Jet OLEDB: FAT CURSOR CACHE SIZE (dbprop_jetoledb_fatcursormaxrow) Indicates the number of rows that cached when cached with remote data storage rows. This value will be ignored unless Jet OLEDB: Enable Fat Cursors is TURE. Jet OLEDB: Inconsistent (dbprop_jetoledb_inconsistent) Indicates whether the query result allows inconsistent updates. Jet OLEDB: LOCKING GRANULARITY (DBProp_jetoledb_lockgranularity) Indicates if the table is opened using the row-level lock. Jet OLEDB: ODBC Pass-Through Statement (dbprop_jetoledb_odbcpasthrough) Indicates that JET should pass the SQL text in the Command object to the backend. JET OLEDB: Partial Bulk Ops (dbprop_jetoledb_bulkpartial) Indicates that the behavior of Jet when the SQL DML operation fails. JET OLEDB: Pass Through Query Bulk-Op (dbprop_jetoledb_passthroughbulkop) Indicates whether the query that does not return the Recordset does not change to the data source. JET OLEDB: Pass Through Query Connect String (DBProp_jetoledb_odbcpassthrough, indicating the JET connection string for connecting to remote data storage. This value will be ignored unless Jet OLEDB: ODBC Pass-Through Statement is TURE. Jet OLEDB: Stored Query (dbprop_jetoledb_stored Query) Indicates whether the command text should be interpreted as a storage query instead of the SQL command. Jet OLEDB: Validate Rules ON Set (DBProp_jetoledb_validateonset) Indicates whether Jet verification rules are calculated when setting column data or submitting changes to the database. By default, OLE DB Provider for Microsoft Jet opens the Microsoft Jet database in read / write mode. To open the database with read-only mode, set the Mode property of the ADO Connection object to AdmodeRead. Command objects of the Command object Command text in the Command object uses Microsoft Jet SQL dialects. You can specify a row in command text to return query, operation query, and table name, but stored procedures will not be specified. The Recordset behavior Microsoft Jet database engine does not support dynamic cursors. Therefore, the OLE DB Provider for Microsoft JET does not support the type of AdlockdyNAMIC cursor. When requesting a dynamic cursor, the provider will return a key set cursor and reset the Cursortype property to indicate the type of Recordset returned. In addition, if the request updatable RecordSet (LockType is AdlockOptiMistic, AdlockBatchOptimistic, or AdlockPESSIMISTIC), the provider will also return a key set cursor and reset the Cursortype property.

Dynamic Properties OLE DB Provider for Microsoft JET Insert multiple dynamic properties in the Properties collection of unmopked Connection, Recordset, and Command objects. The following table is the cross index of the ADO and OLE DB names of each dynamic property. OLE DB Programmer'S Reference uses the "Description" item to reference the ADO property name. For more information on these properties, see OLE DB Programmer's Reference. Search for the OLE DB attribute name or see Appendix C: OLE DB Properties in "Index". Connection Dynamic Properties The following properties are added to the Properties collection of the Connection object.

ADO Property Name OLE DB property name Active Sessions DBPROP_ACTIVESESSIONS Asynchable Abort DBPROP_ASYNCTXNABORT Asynchable Commit DBPROP_ASYNCTNXCOMMIT Autocommit Isolation Levels DBPROP_SESS_AUTOCOMMITISOLEVELS Catalog Location DBPROP_CATALOGLOCATION Catalog Term DBPROP_CATALOGTERM Column Definition DBPROP_COLUMNDEFINITION Current Catalog DBPROP_CURRENTCATALOG Data Source DBPROP_INIT_DATASOURCE Data Source Name DBPROP_DATASOURCENAME Data Source Object Threading Model DBPROP_DSOTHREADMODEL DBMS Name DBPROP_DBMSNAME DBMS Version DBPROP_DBMSVER GROUP BY Support DBPROP_GROUPBY Heterogeneous Table Support DBPROP_HETEROGENEOUSTABLES Identifier Case Sensitivity DBPROP_IDENTIFIERCASE Isolation Levels DBPROP_SUPPORTEDTXNISOLEVELS Isolation Retention DBPROP_SUPPORTEDTXNISORETAIN Locale Identifier DBPROP_INIT_LCID Maximum Index Size DBPROP_MAXINDEXSIZE Maximum Row Size DBPROP_MAXROWSIZE Maximum Row Size Includes BLOB DBPROP_MAXROWSIZEINCLUDESBLOB Maximum Tables in SELECT DBPROP_MAXTABLESINSELECT Mode DBPROP_IN IT_MODE Multiple Parameter Sets DBPROP_MULTIPLEPARAMSETS Multiple Results DBPROP_MULTIPLERESULTS Multiple Storage Objects DBPROP_MULTIPLESTORAGEOBJECTS Multi-Table Update DBPROP_MULTITABLEUPDATE NULL Collation Order DBPROP_NULLCOLLATION NULL Concatenation Behavior DBPROP_CONCATNULLBEHAVIOR OLE DB Version DBPROP_PROVIDEROLEDBVER OLE Object Support DBPROP_OLEOBJECTS Open Rowset Support DBPROP_OPENROWSETSUPPORT ORDER BY Columns in Select List DBPROP_ORDERBYCOLUMNSINSELECT Output Parameter Availability DBPROP_OUTPUTPARAMETERAVAILABILITY Pass By ref Accessors DBPROP_BYREFACCESSORS Password DBPROP_AUTH_PASSWORD Persistent ID Type DBPROP_PERSISTENTIDTYPE Prepare Abort Behavior DBPROP_PREPAREABORTBEHAVIOR Prepare Commit Behavior DBPROP_PREPARECOMMI

TBEHAVIOR Procedure Term DBPROP_PROCEDURETERM Prompt DBPROP_INIT_PROMPT Provider Friendly Name DBPROP_PROVIDERFRIENDLYNAME Provider Name DBPROP_PROVIDERFILENAME Provider Version DBPROP_PROVIDERVER Read-Only Data Source DBPROP_DATASOURCEREADONLY Rowset Conversions on Command DBPROP_ROWSETCONVERSIONSONCOMMAND Schema Term DBPROP_SCHEMATERM Schema Usage DBPROP_SCHEMAUSAGE SQL Support DBPROP_SQLSUPPORT Structured Storage DBPROP_STRUCTUREDSTORAGE Subquery Support DBPROP_SUBQUERIES Table Term DBPROP_TABLETERM Transaction DDL DBPROP_SUPPORTEDTXNDDL User ID Dbprop_auth_userid user name dbprop_username Window Handle DBPROP_INIT_HWND RECORDSET Dynamic Properties The following properties are added to the Properties collection of the Recordset object.

ADO Property Name OLE DB property name Access Order DBPROP_ACCESSORDER Append-Only Rowset DBPROP_APPENDONLY Blocking Storage Objects DBPROP_BLOCKINGSTORAGEOBJECTS Bookmark Type DBPROP_BOOKMARKTYPE Bookmarkable DBPROP_IROWSETLOCATE Bookmarks Ordered DBPROP_ORDEREDBOOKMARKS Cache Deferred Columns DBPROP_CACHEDEFERRED Change Inserted Rows DBPROP_CHANGEINSERTEDROWS Column Privileges DBPROP_COLUMNRESTRICT Column Set Notification DBPROP_NOTIFYCOLUMNSET Column Writable DBPROP_MAYWRITECOLUMN Defer Column DBPROP_DEFERRED Delay Storage Object Updates DBPROP_DELAYSTORAGEOBJECTS Fetch Backwards DBPROP_CANFETCHBACKWARDS Hold Rows DBPROP_CANHOLDROWS IAccessor DBPROP_IAccessor IColumnsInfo DBPROP_IColumnsInfo IColumnsRowset DBPROP_IColumnsRowset IConnectionPointContainer DBPROP_IConnectionPointContainer IConvertType DBPROP_IConvertType ILockBytes DBPROP_ILockBytes Immobile Rows DBPROP_IMMOBILEROWS IRowset DBPROP_IRowset IRowsetChange DBPROP_IRowsetChange IRowsetIdentity DBPROP_IRowsetIdentity IRowsetIndex DBPROP_IRows etIndex IRowsetInfo DBPROP_IRowsetInfo IRowsetLocate DBPROP_IRowsestLocate IRowsetResynch IRowsetScroll DBPROP_IRowsetScroll IRowsetUpdate DBPROP_IRowsetUpdate ISequentialStream DBPROP_ISequentialStream IStorage DBPROP_IStorage IStream DBPROP_IStream ISupportErrorInfo DBPROP_ISupportErrorInfo Literal Bookmarks DBPROP_LITERALBOOKMARKS Literal Row Identity DBPROP_LITERALIDENTITY Maximum Open Rows DBPROP_MAXOPENROWS Maximum Pending Rows DBPROP_MAXPENDINGROWS Maximum Rows DBPROP_MAXROWS Memory Usage DBPROP_MEMORYUSAGE Notification Granularity DBPROP_NOTIFICATIONGRANULARITY Notification Phases DBPROP_NOTIFICATIONPHASES Objects Transacted DBPROP_TRANSACTEDOBJECT Others' Changes visible dbprop_otherupdateDelete Others'

Inserts Visible DBPROP_OTHERINSERT Own Changes Visible DBPROP_OWNUPDATEDELETE Own Inserts Visible DBPROP_OWNINSERT Preserve on Abort DBPROP_ABORTPRESERVE Preserve on Commit DBPROP_COMMITPRESERVE Quick Restart DBPROP_QUICKRESTART Reentrant Events DBPROP_REENTRANTEVENTS Remove Deleted Rows DBPROP_REMOVEDELETED Report Multiple Changes DBPROP_REPORTMULTIPLECHANGES Return Pending Inserts DBPROP_RETURNPENDINGINSERTS Row Delete Notification DBPROP_NOTIFYROWDELETE Row First Change Notification DBPROP_NOTIFYROWFIRSTCHANGE Row Insert Notification DBPROP_NOTIFYROWINSERT Row Privileges DBPROP_ROWRESTRICT Row Resynchronization Notification DBPROP_NOTIFYROWRESYNCH Row Threading Model DBPROP_ROWTHREADMODEL Row Undo Change Notification DBPROP_NOTIFYROWUNDOCHANGE Row Undo Delete Notification DBPROP_NOTIFYROWUNDODELETE Row Undo Insert Notification DBPROP_NOTIFYROWUNDOINSERT Row Update Notification DBPROP_NOTIFYROWUPDATE Rowset Fetch Position Change Notification DBPROP_NOTIFYROWSETFETCHPOSISIONCHANGE Row set Release Notification DBPROP_NOTIFYROWSETRELEASE Scroll Backwards DBPROP_CANSCROLLBACKWARDS Skip Deleted Bookmarks DBPROP_BOOKMARKSKIPPED Strong Row Identity DBPROP_STRONGITDENTITY Updatability DBPROP_UPDATABILITY Use Bookmarks DBPROP_BOOKMARKS Command Dynamic Properties Properties The following properties are added to the collection of the Command object.

ADO Property Name OLE DB property name Access Order DBPROP_ACCESSORDER Append-Only Rowset DBPROP_APPENDONLY Blocking Storage Objects DBPROP_BLOCKINGSTORAGEOBJECTS Bookmark Type DBPROP_BOOKMARKTYPE Bookmarkable DBPROP_IROWSETLOCATE Change Inserted Rows DBPROP_CHANGEINSERTEDROWS Column Privileges DBPROP_COLUMNRESTRICT Column Set Notification DBPROP_NOTIFYCOLUMNSET Defer Column DBPROP_DEFERRED Delay Storage Object Updates DBPROP_DELAYSTORAGEOBJECTS Fetch Backwards DBPROP_CANFETCHBACKWARDS Hold Rows DBPROP_CANHOLDROWS IAccessor DBPROP_IAccessor IColumnsInfo DBPROP_IColumnsInfo IColumnsRowset DBPROP_IColumnsRowset IConnectionPointContainer DBPROP_IConnectionPointContainer IConvertType DBPROP_IConvertType ILockBytes DBPROP_ILockBytes Immobile Rows DBPROP_IMMOBILEROWS IRowset DBPROP_IRowset IRowsetChange DBPROP_IRowsetChange IRowsetIdentity DBPROP_IRowsetIdentity IRowsetIndex DBPROP_IRowsetIndex IRowsetInfo DBPROP_IRowsetInfo IRowsetLocate DBPROP_IRowsetLocate IRowsetResynch IRowsetScroll DBPROP_IRowsetScrol l IRowsetUpdate DBPROP_IRowsetUpdate ISequentialStream DBPROP_ISequentialStream IStorage DBPROP_IStorage IStream DBPROP_IStream ISupportErrorInfo DBPROP_ISupportErrorInfo Literal Bookmarks DBPROP_LITERALBOOKMARKS Literal Row Identity DBPROP_LITERALIDENTITY Lock Mode DBPROP_LOCKMODE Maximum Open Rows DBPROP_MAXOPENROWS Maximum Pending Rows DBPROP_MAXPENDINGROWS Maximum Rows DBPROP_MAXROWS Notification Granularity DBPROP_NOTIFICATIONGRANULARITY Notification Phases DBPROP_NOTIFICATIONPHASES Objects Transacted DBPROP_TRANSACTEDOBJECT Others 'Changes Visible DBPROP_OTHERUPDATEDELETE Others'

转载请注明原文地址:https://www.9cbs.com/read-77117.html

New Post(0)