How to use TMyQuery->Locate

How to use TMyQuery->Locate

Postby 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 << loCaseInsensitive;
iDBModule->MyQueryMealName->Locate("mealstarttime", meal_start_time, Opts)

As it is know, of course it is not located.
mans
 
Posts: 1
Joined: Fri 22 Jul 2005 09:09

Postby Ikar » Fri 22 Jul 2005 11:00

Please use StrToDateTime to DateTimeToString convert meal_start_time to datetime format
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby Guest » Fri 22 Jul 2005 11:59

Thank u!
Guest
 


Return to MySQL Data Access Components