|
String si, SubStr, name;
si = DateToStr (Date ());
SubStr = si.SubString (5, StrToInt (si.Length ()-2)); / * Remove the month and day of the birth date * /
data-> personquery-> Close ();
data-> personquery-> SQL-> Clear ();
data-> personquery-> SQL-> Add ("select * from perinf where birthday like '%" + SubStr + "%'");
data-> personquery-> Open ();
if (data-> personquery-> RecordCount! = 0)
{while (! data-> personquery-> Eof)
{
name = data-> personquery-> FieldValues ["name"];
data-> personquery-> Next ();
}
ShowMessage ("Today is'" + name + "'' s birthday, go and send my best wishes!");
} Query results are not possible, there may be a problem with the SQL statement. Please advise, how to write |
|