Subject Re: [IBO] More EXECUTE BLOCK problems?
Author Martijn Tonies
Hi,

> >On this table:
> >
> >CREATE TABLE I
> >(
> > I INTEGER
> >);
> >
> >
> >I prepare and run this statement:
> >execute block
> >as
> >begin
> > insert into I (i) values (1);
> > insert into I (i) values (2);
> >end
> >
> >With AutoKeyLinks = True and get this error message:
> >Problem in BindingCursor: Check KeyLinks property
>
>
> Could you provide some more info, Martijn?
>
> Why would you set KeyLinksAutoDefine true for a DML statement? Is it
because you have assigned the statement to the InsertSQL property of a
dataset?
>

Cause KeyLinksAutoDefine is always TRUE for me. I assign
nothing but the .SQL property.

> If it's a stand-alone statement:
>
> Which statement object are you using? Is the IsSelectSQL property
available to it? (should be set False in BeforePrepare).

TIBOQuery, as pretty much always ;-)

I'm using the .SQL property and call Prepare before I Open or Execute
every SQL.

> Do you call Execute or Open to run it?

That depends on what IBO returns at the statement type, I believe it returns
stExecProcedure here, so I would be calling Execute.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com