Results 1 to 3 of 3

Thread: ADO 2.1 / OpenSchema?

  1. #1

    Thread Starter
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    Does anyone know how to use ADO to A) get a list of table names and B) get the date & time that the table was last modified?

  2. #2
    New Member
    Join Date
    Jul 2000
    Location
    AZ
    Posts
    3
    You can use ADO OpenSchema to get tablenames, but I am not sure whether you can get date using that.

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Code:
    'uses ADO 2.x and Ado 2.x Ext for DDL and Security
        Dim objCn As New Connection
        
        
        Dim objCat As ADOX.Catalog
        Dim objProc As ADOX.Procedure
        Dim objTable As ADOX.Table
        
        objCn.Open <connectionstring>
            
        Set objCat = New Catalog
        
        objCat.ActiveConnection = objCn
        
        For Each objTable In objCat.Tables
            Debug.Print objTable.Name & ":  " & objTable.DateModified
        Next objTable
    
        
        objCn.Close
        
        
        Set objCat = Nothing
        Set objCn = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width