Using ADO Development Database Application FAQ

zhaozj2021-02-16  74

Using ADO Development Database Application FAQ

http://91mail.51.net

http://91mail.51.net/wz/ado.pdf

1. How do I get an ADO connection string?

1) Use the Windows operating system's file association property to call the Dialog box for Windows "Data Link Properties" to get the ADO connection string.

Proceed as follows:

(1) Right-click on any Explorer window and select "New Document".

(2) Save the document into the extension is the document of .udl.

(3) Double-click this UDL file to open the Data Link Properties dialog.

(4) Click the Provider tab of the Data Link Properties dialog and select an OLE DB provider.

(5) Fill in the appropriate provider information and the data to be used in its label.

(6) Click the OK button to save the file.

(7) Open the UDL file with the Windows NotePad (or other text editor), which includes the OLE DB connection string.

2 How to access Access database via ADO password

Use a gadget that I generated in the previous problem to generate the following string.

Connectionstring = "provider = microsoft.jet.OLEDb.3.51; Persist security info = false; data source = E: / DATAS / WATER.MDB; Jet OLEDB: Database Password = Water"

The data provider is Microsoft.jet.OleDB.3.51, and the data source is the path to the Access file database to be accessed. Jet OLEDB: Database Password is the password set by Microsoft Access.

For more information on these contents, please check the MSDN

3 Why is an adodb.recordset object sometimes not returns the correct RecordCount value.

Just set the value of the CursorLocation property of the AdoDB.Recordset object to be ADUSECLIENT.

For detailed reasons, please check the MSDN

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

New Post(0)