Subject RE: [IBO] TIB_Query: Execute, ExecSQL or ExecuteDDL ?
Author Support List

> I need to create a certain table in my Firebird database from my
> application.
> I use TIBODatabase with default transaction and session for the normal
> data reading/writing etc. The user is a standard user.
> When creating the table, I want to log on as another user, as an
> administrator user.
> Therefore I create a new TIB_Connection for this administrator user.
> Next I use a TIB_Query with that connection.
> The TIB_Query has a number of different methods for executing the SQL that
> will create the database.
> Which one to use in this situation? I assume the ExecuteDDL, but the help
> file is very sparse on the subject. And why not any of the other?
> I suspect I need to do ExecuteDDL in order for the table to be visible for
> the TIBODatabase?

ExecuteDDL() is for executing things like CREATE TABLE, ALTER TRIGGER, etc.

Creating a Database can be done via ExecuteImmediate().

You might also look at the TIB_Session.CreateDatabase() method.

Hope this helps,
Jason LeRoy Wharton