Subject Some problems with update
Author Alexandre
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]