Public Sub DescribeARow()
Const SQL As String = "SELECT * FROM Customers"
Const ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb.mdb;Persist Security Info=False"
Dim Recordset As Recordset
Set Recordset = New Recordset
Call Recordset.Open(SQL, ConnectionString, adOpenDynamic)
Recordset.MoveFirst
Dim Field As Field
For Each Field In Recordset.Fields
Debug.Print "Name: " & Field.Name
Debug.Print "Type: " & Field.Type
Debug.Print "Size: " & Field.ActualSize
Debug.Print "Value: " & Field.Value
Next
End Sub
|