 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
DaveR Guest
|
Posted: Tue Jul 13, 2004 8:20 pm Post subject: Re: EMPTY QUERY error |
|
|
Looks like you have not entered the code in the IB Data set component.
Fill in all the SQL code items - especially the delete query.
The properties of the data set includes 5 SQL items - generate code for
all of them.
Start with Select...
Then "right-click" the TIBDataSet component and use the DATASET EDITOR.
Specify the Key, and the fields you want ...
The delete code generated will look something like...
****
delete from my_Table where my_key_ID = :OLD_my_key_ID
****
Suspect that's it...
buen suerte...
Federico Cárdenas wrote:
| Quote: | Hello
I want to delete some slave records.
When I remove the master record I get the following error:
Project .... raised exception class EIBClientError with message 'Empty query'
My code is as follows:
procedure TFrmGrupos.IBDS_MASTERBeforeDelete(DataSet: TDataSet);
begin
with IBDS_SLAVE do begin // eliminaciones en cascada
Open;
First;
while not EOF do
Delete
end;
end;
Error occurs in the "while not EOF do" line
I have used this kind of code in other parts of my application and I dont have any problems with it. Im using Firebird, BTW.
What's wrong?
Thank you very much in advance
Federico
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|