Уменя проблема я не знаю как в ADO прочитать название таблиц в базе данных Access и поместить их в TreeView
кто знает как это зделать подскажите пожалуста
MSDN писал(а):This example uses the OpenSchema method to display the name and type of each table in the Pubs database.
'BeginOpenSchemaVB
'To integrate this code
'replace the data source and initial catalog values
'in the connection string
Public Sub OpenSchemaX()
Dim Cnxn As ADODB.Connection
Dim rstSchema As ADODB.Recordset
Dim strCnxn As String
Set Cnxn = New ADODB.Connection
strCnxn = "Provider=sqloledb;Data Source=MyServer;Initial Catalog=Pubs;User Id=sa;Password=; "
Cnxn.Open strCnxn
Set rstSchema = Cnxn.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
Debug.Print "Table name: " & _
rstSchema!TABLE_NAME & vbCr & _
"Table type: " & rstSchema!TABLE_TYPE & vbCr
rstSchema.MoveNext
Loop
' clean up
rstSchema.Close
Cnxn.Close
Set rstSchema = Nothing
Set Cnxn = Nothing
End Sub
'EndOpenSchemaVB
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1