Subject | Re: [IBO] Updating (Null) Arrays |
---|---|
Author | Jason Wharton |
Post date | 2002-10-12T00:05:48Z |
NULL is only appropriate for the entire array. There isn't the ability to
have NULL elements of the array.a
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
have NULL elements of the array.a
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
----- Original Message -----
From: "ulfried_koch" <Ulfried.Koch@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, September 18, 2002 1:54 AM
Subject: [IBO] Updating (Null) Arrays
> Hi,
>
> I'm trying to update an Array-Field using PutArray.
> This code works fine , but only if the Fields are not Null in the
> Database. If Null then I get ISC Error:335544329,ISC Message: invalid
> BLOB ID. How to do it with Null-Values ?? I have no idea :-(
>
> var
> ArrayValues : array [1..100] of integer;
> ArraySize : longint;
> begin
> FillChar( ArrayValues, SizeOf( ArrayValues ), 0 );
> ArrayValues[1] := 1;
> ArrayValues[2] := 2;
> ArrayValues[3] := 3;
> ...
> ArraySize := longint( sizeof( ArrayValues ));
>
> cr_arrays.SQL.Clear;
> cr_arrays.SQL.Add('SELECT ARR_FIELD FROM TABLE WHERE ID='+
> IntToStr(my_id) );
>
> cr_arrays.Active:=true;
> cr_arrays.Edit;
>
> with cr_arrays.FieldByName( 'ARR_FIELD' ) as TIB_ColumnArray do
> PutArray( @ArrayValues, @ArraySize );
>
> cr_arrays.Post;
>
>
>
> best regards
>
> Ulfried