BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: EMPTY QUERY error

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
DaveR
Guest





PostPosted: Tue Jul 13, 2004 8:20 pm    Post subject: Re: EMPTY QUERY error Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.