PDA

Click to See Complete Forum and Search --> : ADO TableDef equivalent


gravyboy
Jan 17th, 2000, 09:31 PM
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 mattg@gravyboy.fsnet.co.uk] or matt.graveston@centrica.co.uk

Clunietp
Jan 18th, 2000, 11:37 AM
This works, I used ADO 2.1, ADO 2.1 EXT for DDL and Security, and the Northwind 2000 MDB


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