A wrote:
Hi
How can I delete a column in this case Employername from table Bdemployer
The following code does not work
Set tbl12 = Nothing
Set tbl12 = New adox.Table
'Skep nuwe tabel
With tbl12
.Name = "BdEmployer"
.ParentCatalog = cat1
.Columns.Delete "EmployerName"
End With
cat1.Tables.Append tbl12
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'd probably use a DDL statement to drop the column with an
ADODB.Connection object:
strSQL = "ALTER TABLE BdEmployer DROP COLUMN EmployerName"
objConn.Execute (strSQL,,adCmdText and adCmdExecuteNoRecords)
Be aware that some SQL dialects don't condone the DROP COLUMN syntax,
just use DROP <column name>, instead.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQwOJf4echKqOuFEgEQIKKACbB/C8Q1iuld6kcALmg4k3EREnsBYAn3Wn
NRxxOLh+gW8a0o/so9FtoLQB
=ikMw
-----END PGP SIGNATURE-----