Subject Re: [IBO] Error updating TIBOTable
Author lee@leeway-be.com
Helen,
I am confused, it was my understanding that going from the standard
Delphi TTable to the TIBOTable required practically no change in code.
But trying to just update a record is impossible to me.
I have a table with a key named 'NUM' I just want to open the table
(wich will place it on the first record) change a field and post it.
What must I do to do this ?
Explain it to me as I was (maybe I am) a complete moron please.
As you suggested I put a keylinks statement to tell the TIBOTable
wich the key field is, but the result is the same.

DM.T_Art.Close;
DM.T_Art.KeyLinks.Clear;
DM.T_Art.KeyLinks.Add('NUM');
DM.T_Art.Open;
DM.T_Art.Edit;
DM.T_ArtMENU.AsInteger := 120;
DM.T_Art.Post;

Thanks aforehand for any help.

--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> At 01:17 PM 13-04-01 +0000, you wrote:
> >Hi,
> >I got a TIBOTable defined in a datamodule.
> >The datamodule is called U_DM
> >The table is called T_Art
> >In another module I have the following statements
> >
> >In Formcreate
> > DM.T_Art.Close;
> > DM.T_Art.Open;
> >
> >In Formactivate
> > DM.T_Art.Edit;
> > DM.T_ArtMENU.AsInteger := 120;
> > DM.T_Art.Post;
> >
> >The database is fine, I put some breakpoints in the program and
> >everything is fine up to the Post statement, I checked and he got
the
> >correct record, so the reading partion is fine.
> >I got a error when executing the Post statement.
> >The error is :
> >
> >raised exception class EIBO_ISCError with message
> >'ISC ERROR CODE : 335544569'
> >Dynamic SQL Error
> >SQL error code = -104
> >Token unknown line 6 char 5
> >TIB_Statement '"'
> >TIBOInternalDataset "T_Art.IBOqrT_Art"
> >
> >So I got a SQL error, but this is a TIBOTable, so I do not use SQL.
> >What can be wrong, and how do I fix this ?
>
> Actually, with TIBOTable, you do use SQL. The TIB_Statement
underlying the dataset is SELECT * FROM ATable. The automatically
created update statement would be
>
> UPDATE ATable set AField = whatever
> WHERE {KeyLinks Field} = :{value of current keylinks}
>
> The likely cause for this error is that you have no KeyLinks
defined. Rejection is occurring in the WHERE clause because an empty
string is being passed in lieu of a KeyLinks column name.
>
> Is this the case?
>
> Regards,
> Helen
>
>
>
> >Lee
> >
> >
> >
> >
> >
> >
> >Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
> All for Open and Open for All
> InterBase Developer Initiative ยท http://www.interbase2000.org
> _______________________________________________________