|
TDateTimePicker 컴포넌트 2개를 가지고 선택된 날짜에서
등록된 디비의 날짜 사이의 값을 가져오고 싶습니다.
아래처럼 해봤는데 에러가 나서 어찌 고처야 하는지 모르겠습니다.
this->Query1->Close();
this->Query1->SQL->Clear();
this->Query1->SQL->Add("select * from TEST.db ");
this->Query1->SQL->Add("where RegisteDate BETWEEN "+ this->DateTimePicker_from->Date.FormatString("yyyy-mm-dd") +" AND " +this->DateTimePicker_to->Date.FormatString("yyyy-mm-dd") + "");
this->Query1->Prepare();
if(Query1->Prepared) Query1->Open();
에러가 납니다.
DB
[Field] RegisteDate [Type] Date
|