Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty IBQuery???

Status
Not open for further replies.

EricDraven

Programmer
Jan 17, 2002
2,999
GB
Is there a command to empty a queries results like EmptyTable? At the moment I am using the delete command in a loop as there is never more than ten records retrieved but every other time I try to run the procedure, I receive an "Update failed" message.

Does anybody have any ideas?


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
hi

Why not have

query.sql.add('delete from <table> where <condition>');
query.execsql;

lou

 
Fixed it!

Apparently the IBQuery component pulls up this &quot;Update Failed&quot; message when the number of records updated isnt exactly 1. The easiest way around this is to use the IBDataset component which doesnt perform this check.

Thanks for the tip though Weez (and also the speediest repsonse Ive ever had on Tek Tips :))


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top