Get the number of the number of tables in the Access library and the name of the table

xiaoxiao2021-03-06  38

'Features: How to get the number of the ACCESS library in the table name' How to implement 'project with ADO ---> Quote ---> Microsoft ActiveX Data Object 2.x (version number) "------- -------------------------------------------------- ------------------- Private sub form_load () Dim adocn as new adodb.connection 'Defines Database connection DIM STRCNN As New AdoDb.RecordSetdim Rstschema As New AdoDDimRSetdim i As Integer str1 = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = c: /Northwind.MDB; Persist Security Info = False" adoCN.Open str1 Set rstSchema = adoCN.OpenSchema (adSchemaTables) Do Until rstSchema.EOF If ! rstSchema TABLE_TYPE = "TABLE" Then out = out & "Table name:"! & _ rstSchema TABLE_NAME & vbCr & _ "Table type:"! & rstSchema TABLE_TYPE & vbCr I = I 1 End If rstSchema.MoveNext Loop MsgBox I Rstschema.close adocn.closedebug.print Outend Sub

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

New Post(0)