Listing Data Types : Column Type « Application « VBA / Excel / Access / Word






Listing Data Types

 
Sub ListDataTypes()
   Dim conn As ADODB.Connection
   Dim rst As ADODB.Recordset

   Set conn = New ADODB.Connection
   conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurrentProject.Path & "\mydb.mdb"
   Set rst = conn.OpenSchema(adSchemaProviderTypes)
   Do Until rst.EOF
      Debug.Print rst!Type_Name & vbTab _
          & "Size: " & rst!Column_Size
      rst.MoveNext
   Loop
   rst.Close
   conn.Close
   Set rst = Nothing
   Set conn = Nothing
End Sub

 








Related examples in the same category

1.Changing the Value of an AutoNumber