Subject | RE: [IBO] Problems with: TIB_ColumnArray in TIB_DSQL-Params |
---|---|
Author | Jason Wharton |
Post date | 2008-04-02T23:38:59Z |
As a short-term work around perhaps you could pass the values for the array
as individual items into a stored procedure and then have the stored
procedure plug in the values.
I'll download your sample app and have a look at it and see what I can do.
Thanks,
Jason Wharton
as individual items into a stored procedure and then have the stored
procedure plug in the values.
I'll download your sample app and have a look at it and see what I can do.
Thanks,
Jason Wharton
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of leonhard.schneider
> Sent: Wednesday, April 02, 2008 11:05 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Problems with: TIB_ColumnArray in TIB_DSQL-Params
>
>
> Hi, IBO-experts,
>
> we have a problem with IBO when using columnarrays with
> params in TIB_DSQL.
>
> The complete source of a test is uploaded to this Yahoo-Group to:
> ->Files->Bug Testing Applications
> ->source__TIB_ColumnArray_in_TIB_DSQL-Params.zip
> (source to problem: TIB_ColumnArray in TIB_DSQL-Params)
> and contains the essentiel test files:
>
> Code is from original IBO4.8.7-samples, BlobInserts:
> Only a few commentated lines are added to original IBO-sample
> to test inserting of columnarrays with params in TIB_DSQL!
>
> We have seen the IBO-Examples with TIB_Query - which work fine -,
> but in our existing complex application we use fast record-inserting
> with many TIB_DSQLs. So it would be very helpful, if this slightly
> changed IBO-sample with TIB_DSQL would work!
>
> In case of existing IBO-bugs, are there (fast) work-arounds for?
>
> Nothing was found related to this problem in IBO-Help, IBO-FAQs
> or discussiongroups ...
>
> Many thanks for help! Leo Schneider.
>
> Platform: IBO 4.8.7,
> Firebird 2.0 (WI-V2.0.1.12855 Firebird 2.0),
> Delphi5 on WindowsXP.
>
> ////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////
> Here the essential changes made to Code
> from original IBO4.8.7-samples, BlobInserts:
> ////////////////////////////////////////////////////////////////////
> // These lines added by LS.:
>
> added in Script:
> ...
> INTEGERARR INTEGER [10] ,
> ...
> added in dsql.SQL:
> ...
> :INTEGERARR,
> ...
>
> added in procedure btn_TestItClick:
> ...
> const COUNT_Array=10;
> var ArrayIntegers: array[1..COUNT_Array] of Integer;
> ArraySize: ISC_LONG;
> ii: Integer;
> tmpColArr: TIB_ColumnArray;
> ...
> begin
> ...
> // All works fine if not checked cb_CreateArrays !!!!!!!!
>
> if cb_CreateArrays.Checked then
> begin
>
> for ii:=1 to COUNT_Array do ArrayIntegers[ii]:=ii;
>
> ArraySize:=ISC_LONG(COUNT_Array*4);
>
> tmpColArr:=ParamByName('INTEGERARR') as TIB_ColumnArray;
> tmpColArr.PutArray( @ArrayIntegers, @ArraySize );
> (* !!! Here the PutArray method results to Error !!!!
> The Message is:
> ISC ERROR CODE:335544727
> ISC ERROR MESSAGE:
> Error writing data to the connection.
> *)
>
> end;
>
> // <=== (LS, added end)
> // From here is original IBO-sample ...
> ////////////////////////////////////////////////////////////////////
>
>
> The complete source of a test is uploaded to this Yahoo-Group:
> ->Files->Bug Testing Applications
> ->source__TIB_ColumnArray_in_TIB_DSQL-Params.zip
> (source to problem: TIB_ColumnArray in TIB_DSQL-Params)