Selecting with datetime

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

dpap
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 28.06.2014, 21:47

Selecting with datetime

Postby dpap » 28.06.2014, 22:03

I wrote this code

with form20.aZQuery do begin
emptydataset;
SQL.text := 'SELECT COUNT(aDateTimeFieldName) FROM aTable WHERE aDateTimeFieldName='+quotedStr(aDateTimeValueThatDoesntExistInAnyRecord);
open;
result := not isEmpty;
end;

I expect to return an empty table (recordcount =0, isEmpty = TRUE) but allways It returns isEmpty = FALSE (recordcount =1) even the datetime doesn' exist

Why ?
I'm somewhere wrong ?

Return to “MySQL”

Who is online

Users browsing this forum: No registered users and 1 guest