Subject | Updating (Null) Arrays |
---|---|
Author | ulfried_koch |
Post date | 2002-09-18T08:54:58Z |
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
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