
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.