Version 6: TSmartQuery not working with ROWID

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Version 6: TSmartQuery not working with ROWID

Post by MarkF » Thu 05 Apr 2007 14:05

Hi Folks,

It looks like in version 6, CanModify of TSmartQuery is false for single table queries using ROWID and no primary key. The same code had no problems on Version 5.

i.e. select rowid, t.* from mytabwithnopk t;
version 5: CanModify = True
version 6: CanModify = False

Thanks for any help!

-Mark Ford

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 06 Apr 2007 08:49

We could not reproduce the problem. Please check if this problem exists when using pre-built ODAC version. Please find out and inform us about the values of the DacVersion and OdacVersion variables.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Post by MarkF » Fri 06 Apr 2007 13:11

I've done more testing and it appears that this is a change from ODAC version 5 to version 6. Basically in Version 5, you could call Prepare and if the query included a rowid then CanModify would be true. In version 6 it looks like CanModify is always false after the prepare call and doesn't get set until execute. With version 5 I could do something like:

OQuery.SQL.Text :=
'select rowid, t.* from emp11 t';
OQuery.Prepare;
if not OQuery.CanModify then // in V5 CanModify would be true here.
begin
// Set Keyfields property, etc.
end;
OQuery.Execute();

Any comments or suggestions are greatly appreciated!

-Mark

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

Post by Challenger » Fri 13 Apr 2007 07:50

We have reproduced the problem and now we are investigating it. We will let you know as soon as we get any results.

Post Reply