Page 1 of 1

Locate by date

Posted: 24.10.2008, 14:26
by kend
I'm in the process of converting from Access using dbGo to MySQL using Zeos. These lines:

if locate('Date', datetostr(date), []) then
Edit
else
Append;

worked with Access to edit a record if it exists with todays date or add a record if not but it doesn't work with MySQL. Could someone let me know what might be wrong? I assume it's a date format problem or some such?

Many thanks,

Ken

Posted: 27.10.2008, 11:29
by seawolf
If i type

Query.Locate('c_date_came',EncodeDateTime(2002,12,19,14,0,0,0),[])

It works to me

Posted: 27.10.2008, 12:04
by kend
You're a gentleman and a scholar, works perferctly.