Subject | Re: [firebird-support] Multiple dynamic sql statements supported? |
---|---|
Author | Paul Vinkenoog |
Post date | 2011-01-15T00:07Z |
Hello Matthew,
The Firebird *server* doesn't recognize it, doesn't want it and gives the above error.
But the server does accept this:
execute block as
begin
insert into mytable values (2, 3);
insert into mytable values (8, -15);
insert into mytable values (0, 255);
end
Notice that there is no termination character after 'end'.
Any client that passes the user input *unchanged* to the server can be used for this type of statement.
I've never used the .NET provider, so I don't know about that. What is the exact error that you get if you pass the execute block statement without the SET TERM stuff (as you did the first time)?
Paul Vinkenoog
> Execute block indeed no worky. My sql looked like this:SET TERM is not SQL, but a client extension supported by e.g. isql and FlameRobin.
>
> set term ^ ;
> execute block as begin
> insert into ...;
> insert into ...;
> end ^
>
> The .NET provider threw an FbException with the following error message:
>
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 1, column 5
> term
>
> Any ideas?
The Firebird *server* doesn't recognize it, doesn't want it and gives the above error.
But the server does accept this:
execute block as
begin
insert into mytable values (2, 3);
insert into mytable values (8, -15);
insert into mytable values (0, 255);
end
Notice that there is no termination character after 'end'.
Any client that passes the user input *unchanged* to the server can be used for this type of statement.
I've never used the .NET provider, so I don't know about that. What is the exact error that you get if you pass the execute block statement without the SET TERM stuff (as you did the first time)?
Paul Vinkenoog