請問一下我要如何讀出 Access 中的欄位名稱?????我看Help中有寫到但是我如要讀出某特定的 Teble 中的 欄位名稱....我有三考以下的程式,請指教....
Dim cnn1 As ADODB.Connection
Dim rstSchema As ADODB.Recordset
Dim strCnn As String
strCnn = ""Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=d:\Program Files\Microsoft Visual Studio\VB98\class.mdb;"
Set cnn1 = New ADODB.Connection
cnn1.Open strConnection
Set rstSchema = cnn1.OpenSchema(adSchemaColumns)
Do Until rstSchema.EOF
Debug.Print "Table name: " & objRec!COLUMN_NAME
rstSchema.MoveNext
Loop
rstSchema.Close
cnn1.Close