bejarun
bejarun

Reputation: 175

EDBEngineError 'table is readonly'

I have 3 TQueries: qy_master, qy_detail, qy_detail2, master of qy_detail2 is qy_detail, master of qy_detail is qy_Master, all queries have corresponding data-sources, I placed queries in datamodule, when datamodule create I activate those queries.

In another form I used those queries, when trying 'qy_detail.open' it says 'EDbengine error : Tables is read-only' but no problem when opening qy_detail, I don't modify SQL statements, but I don't know why this error happens.

I also tried with qy_detail.Active := True; this statement also raise error,

I used SQL Server 2005 connected via BDE and ODBC datasources.

Please anyone help me to fix this.

Upvotes: 2

Views: 1650

Answers (1)

nathan_jr
nathan_jr

Reputation: 9282

Have you set TQuery.RequestLive = true? RequestLive is False by default forcing query to always return as read-only result set.

From documentation:

A TQuery can return two kinds of result sets: "live" as with TTable component (users can edit data with data controls, and when a call to Post occurs changes are sent to database), "read only" for display purposes only. To request a live result set, set a query component's RequestLive property to True...

Upvotes: 1

Related Questions