Adding new fields to an existing table 
Author Message
 Adding new fields to an existing table

I just can't seem to get this to work! - can anyone tel me how to add a
field to a table. I'm using 16 bits VB4 prof. ed.
much thanks
Peter.


Sun, 23 Mar 2003 03:00:00 GMT  
 Adding new fields to an existing table
There is no general code in VB to add a field to a table; it depends on
the database. For example, to add a field in Oracle, you would send the
DB the command
ALTER TABLE MyTable ADD NewField (CHAR(1), NOT NULL);
For SQL Server, it is something else, for Informix DB it is something
else, etc. Also keep in mind that you might not be able to create a new
field in a table if there is already data in that table. Unless it is a
temporary table to store temporary data, you should probably just add
the field with the Database software, not with VB.



Quote:
> I just can't seem to get this to work! - can anyone tel me how to add
a
> field to a table. I'm using 16 bits VB4 prof. ed.
> much thanks
> Peter.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 23 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

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

3. Add New Field in existing Table (VB6)

4. Adding a new field to an existing table via ADOX

5. Adding a new field to an existing database

6. Crystal, add new table to existing report?

7. Adding New Field to Existing Repot

8. Adding new column to existing table

9. Adding new column to existing table

10. Adding new column to existing table

11. Add New Field To Existing Database

12. Adding required fields with default values to existing tables

 

 
Powered by phpBB® Forum Software