Subject | Re: [IBO] Some problems with update |
---|---|
Author | Hans |
Post date | 2008-07-30T04:54:44Z |
I believe the fieldname MAX is a reserved word and cannot be used it this
context.
Surrounding it with quotes like "MAX" may work, but will become difficult to
work
with. If possible rename the field from MAX to something else like MAXOFTHIS
context.
Surrounding it with quotes like "MAX" may work, but will become difficult to
work
with. If possible rename the field from MAX to something else like MAXOFTHIS
----- Original Message -----
From: "Alexandre" <alexandrepires2007@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, July 29, 2008 8:59 PM
Subject: [IBO] Some problems with update
> Hi Guys,
>
> Please, help me. I have a thread with this code:
>
> ......
> ......
> tb_flag_off:=TIB_Query.Create(ibSession);
> tb_flag_off.IB_Connection:=ibConnection;
> tb_flag_off.IB_Session:=ibSession;
> tb_flag_off.SQL.Add('select username,senha,max from tb_login order by
> np');
> tb_flag_off.EditSQL.Add('update tb_login set
> username=:username,senha=:senha,max=:max where username=:OLD_USERNAME');
> tb_flag_off.KeyLinks.Add('TB_LOGIN.USERNAME');
> tb_flag_off.Open;
> tb_flag_off.First;
>
> ...............
> ...............
> ...............
>
> tb_flag_off.Edit;
> tb_flag_off.FieldValues['username']:=atual;
> tb_flag_off.FieldValues['senha']:=se;
> tb_flag_off.FieldValues['max']:=10;
> tb_flag_off.Post;
>
> Sometimes the following error occurs in the las line (tb_flag_off.Post):
> Record was not located to update
>
> Someone knows why this error occurs in this code ?
>
> Thx for some help
> Alexandre
> Brazil
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>