Page 1 of 1

Version 6: TSmartQuery not working with ROWID

Posted: Thu 05 Apr 2007 14:05
by MarkF
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

Posted: Fri 06 Apr 2007 08:49
by Plash
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.

Posted: Fri 06 Apr 2007 13:11
by MarkF
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

Posted: Fri 13 Apr 2007 07:50
by Challenger
We have reproduced the problem and now we are investigating it. We will let you know as soon as we get any results.