OraQuery relevant

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yeah_xxc
Posts: 7
Joined: Sat 12 Aug 2006 14:41

OraQuery relevant

Post by yeah_xxc » Sun 13 Aug 2006 04:10

after using Oraquery->Edit() method on the query result, I received Ora Error: cannot modify a read-only dataset.

In BDE there is a property requestlive for TQuery, it works when this is true. But how can I successfully excute this method( Edit() ) for Qraquery?

Thanks.

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

Post by Plash » Mon 14 Aug 2006 09:12

TOraQuery is editable only if you set its SQLUpdate property. To delete and insert rows in dataset you should set also SQLDelete and SQLInsert properties. These properties contain SQL that component executes to modify data in database.

To easily create editable dataset you can use TSmartQuery component, which generates these SQLs automatically. For TSmartQuery component to be editable set its KeyFields property or include ROWID in list of SELECT fields.

Post Reply