How to use TMyQuery->Locate

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mans
Posts: 1
Joined: Fri 22 Jul 2005 09:09

How to use TMyQuery->Locate

Post by mans » Fri 22 Jul 2005 09:26

Hi.
I am using cbuilder6 and are trying to locate a record,
the record has a kolumn with the datatype datetime.
and it is by this kolumn that i am trying to locate the record, the problem
is that i dont know how to convert th char* meal_start_time to a datetime
so that it is in the right format so that the record can be located.
meal_start_time has the format 2003-12-12 13:14:05

char* meal_start_time = getMealStartTime(meal_char);
TLocateOptions Opts;
Opts MyQueryMealName->Locate("mealstarttime", meal_start_time, Opts)

As it is know, of course it is not located.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 22 Jul 2005 11:00

Please use StrToDateTime to DateTimeToString convert meal_start_time to datetime format

Guest

Post by Guest » Fri 22 Jul 2005 11:59

Thank u!

Post Reply