D
dave
I need to add a column to a table using ADO.
The following works, but only for a new table. How should I change this to
alter an existing table?
Dim strConn
Dim Catalog As New ADOX.Catalog
Dim Table As ADOX.Table
Set Catalog = New ADOX.Catalog
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data.mde"
Catalog.ActiveConnection = strConn
Set Table = New ADOX.Table
Table.Name = "tblExistingTable"
Table.Columns.Append "NewColumn", adBoolean
Catalog.Tables.Append Table
The following works, but only for a new table. How should I change this to
alter an existing table?
Dim strConn
Dim Catalog As New ADOX.Catalog
Dim Table As ADOX.Table
Set Catalog = New ADOX.Catalog
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data.mde"
Catalog.ActiveConnection = strConn
Set Table = New ADOX.Table
Table.Name = "tblExistingTable"
Table.Columns.Append "NewColumn", adBoolean
Catalog.Tables.Append Table