Prevent automatic generation of SQL statement

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dokkie
Posts: 43
Joined: Wed 08 Oct 2008 21:58

Prevent automatic generation of SQL statement

Post by Dokkie » Sat 22 Nov 2008 19:58

I have a FB table which I want to allow insertion and modification of records but deny record deletion.

If I construct a Select statement in a IBDAC table component and leave the update SQL's unchanged the Insert, Update, Refresh, Delete SQL statements will be generated automatically - which is fine except I don't want the DELETE statement to be generated.

How do I prevent the automatic generation of a particular SQL statement (in this case the DELETE). I know that I can write my own DELETESQL statement which will be used - but I don't want a delete statement at all.

Peter

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

Post by Plash » Mon 24 Nov 2008 09:57

You can add the BeforeDelete event handler for the TIBCTable or TIBCQuery component. In this handler call Abort.

Post Reply