Results 1 to 2 of 2

Thread: ADO TableDef equivalent

  1. #1

    Thread Starter
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334

    Post

    How can I append a field to a table in ADO.

    Ie in DAO this is part of TableDefs.

    I want to add a Yes/No field.

    ------------------
    Matt G
    Either [email protected]] or [email protected]

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    This works, I used ADO 2.1, ADO 2.1 EXT for DDL and Security, and the Northwind 2000 MDB

    Code:
        Dim cn As ADODB.Connection
        Dim rs As New Recordset
        Dim ax As ADOX.Catalog
        
        Set ax = New Catalog
        Set cn = New Connection
        
        cn.Open "Provider=microsoft.jet.oledb.4.0;Data Source=Nwind2k.mdb"
        
            
        ax.ActiveConnection = cn
        
        ax.Tables("Customers").Columns.Append "BitTest", adBoolean
    HTH

    Tom

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