Hello,
Using ADO I have copied a table with another name within the same database.
next I have deleted all records within the copied table so that i have just the structure.
Now I want to add some fields to the structure before I load the table with data.
Anyone done this before?
I am using the following:
Dim tbl As ADOX.Table
Set tbl = New ADOX.Table
With tbl
.Name = "tblnamel"
.Columns.Append "Field1", adWChar
.Columns.Append "Field2", adDate
.Columns.Append "Field3", adDate
End With
But I am encountering a problem where the newly appended columns don't seem to have got added. Later in the logic when I try to add data to the appended columns, I get an error telling me that the columns don't exist in the table.
Any suggestions?
Thanks in advance.
Uttam
Using ADO I have copied a table with another name within the same database.
next I have deleted all records within the copied table so that i have just the structure.
Now I want to add some fields to the structure before I load the table with data.
Anyone done this before?
I am using the following:
Dim tbl As ADOX.Table
Set tbl = New ADOX.Table
With tbl
.Name = "tblnamel"
.Columns.Append "Field1", adWChar
.Columns.Append "Field2", adDate
.Columns.Append "Field3", adDate
End With
But I am encountering a problem where the newly appended columns don't seem to have got added. Later in the logic when I try to add data to the appended columns, I get an error telling me that the columns don't exist in the table.
Any suggestions?
Thanks in advance.
Uttam