new columns in existing table 
Author Message
 new columns in existing table

Hi,
(VB6 sp3 and ADO 2.1)
We want to add new columns to an existing table.
When we do the following:
Cat.Tables("tbl1").Columns.Append "col1", adCurrency
Cat.Tables("tbl1").Columns.Append "col2", adInteger
Cat.Tables("tbl1").Columns.Append "col3", adCurrency
Cat.Tables.Refresh
tbl.Name = "tbl1"
tbl.Columns("col2").Attributes = adColNullable

columns are indeed added. But I can't get the col1 to be Nullable

When we try it the other way, like the following, nothing is added to the
table.
With tbl
    .Name = "tbl1"
    .Columns.Append "col1", adCurrency
    .Columns.Append "col2", adInteger
    .Columns("col2").Attributes = adColNullable
    .Columns.Append "col3", adCurrency
End With

Cat.Tables.Refresh

How do I add columns and use the nullable attribute?
Peter



Sun, 29 Sep 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Adding new column to existing table

2. Adding new column to existing table

3. Adding new column to existing table

4. Crystal Reports: Use Data Set in Existing Columns to Generate a New Column

5. How to modified existing field and add new field in existing table for Access database

6. Create new field in existing table exactly like field in second table

7. need help please:joined tables,add new entries based on one table columns

8. need help please:joined tables,add new entries based on one table columns

9. Add column to existing table

10. add a column to an existing data table

11. add column to an existing data table

12. Adox - Add Column to existing table (HELP!!)

 

 
Powered by phpBB® Forum Software