Subject | TIBOQuery posting error |
---|---|
Author | Nols Smit |
Post date | 2005-07-05T20:58:53Z |
I'm using the code appearing below to update a FireBird table via an IntraWeb application:
if UserSession.IBOPhotoAlbum.State = dsInsert then
begin
with UserSession.IBOPhotoAlbum do
begin
Close;
SQL.Clear;
SQL.Add('Insert into PhotoAlbum (Description, LoadedPhoto)');
SQL.Add('Values (:Description, :LoadedPhoto)');
ParamByName('Description').AsString := edtDescription.text;
ParamByName('LoadedPhoto').LoadFromStream (UserSession.ms, ftGraphic);
Open;
end;
end;
But on executing the Open statement, I get the following error message although the record is loaded.
class EIB_Error with message 'FieldNo: -1 not found'.
The table has a unique key named ID. I increment this key via the following trigger code:
AS
BEGIN
IF (NEW.ID is null) THEN
NEW.ID = GEN_ID(photoalbum_id_gen, 1);
END
Apart from the error message, the updating seems fine.
Regards,
Nols Smit
[Non-text portions of this message have been removed]
if UserSession.IBOPhotoAlbum.State = dsInsert then
begin
with UserSession.IBOPhotoAlbum do
begin
Close;
SQL.Clear;
SQL.Add('Insert into PhotoAlbum (Description, LoadedPhoto)');
SQL.Add('Values (:Description, :LoadedPhoto)');
ParamByName('Description').AsString := edtDescription.text;
ParamByName('LoadedPhoto').LoadFromStream (UserSession.ms, ftGraphic);
Open;
end;
end;
But on executing the Open statement, I get the following error message although the record is loaded.
class EIB_Error with message 'FieldNo: -1 not found'.
The table has a unique key named ID. I increment this key via the following trigger code:
AS
BEGIN
IF (NEW.ID is null) THEN
NEW.ID = GEN_ID(photoalbum_id_gen, 1);
END
Apart from the error message, the updating seems fine.
Regards,
Nols Smit
[Non-text portions of this message have been removed]