How to empty a Table?

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

Moderators: gto, EgonHugeist

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

How to empty a Table?

Postby IbeDBob » 12.07.2013, 22:38

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
Gold Boarder
Gold Boarder
Posts: 658
Joined: 17.01.2011, 14:17

Postby marsupilami » 13.07.2013, 10:54

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


Return to “6.6 - stable”

Who is online

Users browsing this forum: No registered users and 1 guest