static void GetZodiacSign(long Day, long Month, BSTR& Sign)
{
  unsigned short year = ((Month == 1) && (Day <= 19)) ? 2001 : 2000;
  static const LPCTSTR SQL =
    _T("SELECT Name FROM ZODIAC WHERE (CAST(\"%s\" AS DATE) BETWEEN StartingDate AND EndingDate)");
  TDateTime BirthDay(year,
                     static_cast<unsigned short>(Month),
                     static_cast<unsigned short>(Day));
  ZodiacDataModule->QZodiac->Active = FALSE;
  ZodiacDataModule->QZodiac->SQL->Clear();
  ZodiacDataModule->QZodiac->SQL->Add(
    Format(SQL, ARRAYOFCONST(( BirthDay.DateString().c_str() ))) );
  ZodiacDataModule->QZodiac->Active = TRUE;

  if (ZodiacDataModule->QZodiac->RecordCount != 1)
    throw Exception(_T("Invalid arguments"));

  ZodiacDataModule->QZodiac->First();
  WideString wstrSign =
    ZodiacDataModule->QZodiac->FieldByName(_T("Name"))->AsString.c_str();
  Sign = wstrSign.Detach();
}
