How to empty a Table?

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
IbeDBob
Junior Boarder
Junior Boarder
Posts: 47
Joined: 27.05.2010, 21:04

How to empty a Table?

Post by IbeDBob »

Hi, did some searching here and nothing helps. Read the Help system, same.

tblFiles.EmptyDataSet;

Sometimes it shows tblFiles.RecordCount as = to 0 and other times it does not.

I need to re-use a temporary Table 30-times per run of my application and I need to empty it before EVERY use.

I also tried an SQLQuery
DELETE * FROM tblFiles and it didn't like the *

Tried
DELETE FROM tblFiles and it did nothing.
Thanks

Dyslexic Bob
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Post by marsupilami »

Hello IbeDBob,

what kind of database do you use? Could you post some sourcecode on how you try to do it? Normally something like this should work:

Code: Select all

ZConnection.Close;
ZConnection.SQL.Text := 'DELETE FROM tblFiles';
ZConnection.ExecSQL;
Best regards,

Jan
Post Reply