Problem using Locate on TOraNumberField

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mwarreyn
Posts: 2
Joined: Sun 16 Apr 2006 09:47

Problem using Locate on TOraNumberField

Post by mwarreyn » Sun 16 Apr 2006 10:02

Hello,

I'm using ODAC 5.70.0.29 and Delphi 7. I have a problem when
I try to locate.

STATUS_ID is a TOraNumberField

I use this straightforward code


if DMOra.qryStatusAll.Locate('STATUS_ID',xxx,[]) then begin
DMOra.qryStatusAll.Edit;
...
DMOra.qryStatusAll.Post;
end;

But the query doesn't really locate. After locate the cursor is always at the first record. So when I used this code in a loop I always updated only the first record.

Configuration of TSmartQuery

Name := 'qryStatusAll';
UpdatingTable := 'ip_status';
KeyFields := 'STATUS_ID';
KeySequence := 'TICKETSDB.SEQ_IP_STATUS';
Session := OraSession;
SQL.Add('SELECT *');
SQL.Add('FROM ip_status');
Debug := True;
FetchAll := True;
AutoCommit := False;
LockMode := lmNone;

Any ideas how to fix it?

Best regards,

M.Warreyn

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 18 Apr 2006 11:39

We reproduced and fixed this problem. This fix will be included in the next build of ODAC.

Post Reply