Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  All  the  Fields  and  Data  Types  in  an  Access  Database  

 Content of List All the Fields and Data Types in an Access Database.vbs
MD5 Hash: 423D3FCA92FE008F30F071EADCBD0E89
Const adSchemaTables = 20
Const adSchemaColumns = 4

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

objConnection.Open _
"Provider = Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = 'C:\Scripts\Test.mdb'"

Set objRecordSet = objConnection.OpenSchema(adSchemaTables)

Do Until objRecordset.EOF
strTableName = objRecordset("Table_Name")
Set objFieldSchema = objConnection.OpenSchema(adSchemaColumns, _
Array(Null, Null, strTableName))
Wscript.Echo UCase(objRecordset("Table_Name"))

Do While Not objFieldSchema.EOF
Wscript.Echo objFieldSchema("Column_Name") & ", " & objFieldSchema("Data_Type")
objFieldSchema.MoveNext
Loop

Wscript.Echo
objRecordset.MoveNext
Loop



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a