Hi Thomas,
By the same way, using FbCommand.ExecuteNonQuery(). The following code
adds a new column to a table:
// Open connection
FbConnection myConnection =3D new FbConnection(myConnectionString);
myConnection.Open();
// Init transaction
FbTransaction myTransaction =3D myConnection.BeginTransaction();
// Command
FbCommand myCommand =3D new FbCommand();
myCommand.CommandText =3D "alter table MY_TABLE add NEW_COLUMN blob";
myCommand.Connection =3D myConnection;
myCommand.Transaction =3D myTransaction;
// Execute Update
myCommand.ExecuteNonQuery();
// Commit changes
myTransaction.Commit();
// Free command resources in Firebird Server
myCommand.Dispose();
// Close connection
myConnection.Close();
Regards,
Aitor.
-----Mensaje original-----
De: fir...@li...
[mailto:fir...@li...] En nombre de
Thomas Juul
Enviado el: mi=E9rcoles, 01 de octubre de 2003 0:27
Para: fir...@li...
Asunto: [Firebird-net-provider] alter table, create table and drop
table?
To update, insert and delete table I use the FbCommand.
=A0
But how do a make a ALTER Table, CREATE table or a DROP table ?
=A0
Regards
Thomas
|