If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
We have just changed all of our DB functionality from the BDE with the standard component query to ADO with the ADOquery. The follow doesn’t work anymore now :
qRooms->Close();
qRooms->SQL->Clear();
qRooms->SQL->Add("Select * from Billeting where (SDATE >=:startdate and");
qRooms->SQL->Add("SDATE <=:enddate) or (EDATE >=:startdate and");
qRooms->SQL->Add("EDATE <=:enddate) or (SDATE <:startdate and");
qRooms->SQL->Add(" :startdate < EDATE) order by BLDG");
qRooms->Parameters->ParamByName("startdate")->Value = StrToDate(VOQDate);
qRooms->Parameters->ParamByName("enddate")->Value = (StrToDate(VOQDate) + 14);
qRooms->Open();
I am not familiar with bc++ 6 builder - but does it matter that no spaces exist between the 1st and 3rd add methods (I put # where a space was lacking) ?
qRooms->SQL->Add("Select * from Billeting where (SDATE >=:startdate and #");
qRooms->SQL->Add("# SDATE <=:enddate) or (EDATE >=:startdate and #");
qRooms->SQL->Add("# EDATE <=:enddate) or (SDATE <:startdate and");
No errors, I just don't get all the data back. I run that in SQL analyzer and I get all the correct data back, but in Builder I only get some of the data back.