Subject Executing a block of statements in C++
Author Greg At ACD
Hi all,

I am fairly new with Firebird, although I have previously worked
with many other database systems. I am evaluating Firebird for an
embedded application database, and I have (hopefully a simple)
question on executing a group of SQL DDL statements.

I am using Microsoft Visual C++ (.NET 2003, but no .NET extensions,
just raw C++), and the Interbase/Firebird API.

My app can create the DB well enough (using
isc_dsql_execute_immediate), but now I'm having problems executing
what I think should be a pretty straightforward script. Essentially,
I want to create (as an example) a set of generators... so I create
a script as follows:

create generator gen1;
create generator gen2;
create generator gen3;
create generator gen4;
create generator gen5;
create generator gen6;

Now I try to execute this, and I get an error as follows:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 2, char 1.
create.

Am I able to execute this as one block, or do I have to separate
them into separate commands? I would think that I should be able to
submit this as a single script (for example, my DDL statements for
creating my tables, views, stored procedures, triggers etc.) instead
of a bunch of single statements over the wire.

I'm not sure what I'm missing here :(

Greg