Article View: borland.public.cppbuilder.database.ado
Article #3204Query problem with MSSQL using ADO
From: bmkiss67
Date: Thu, 05 Dec 2002 15:59
Date: Thu, 05 Dec 2002 15:59
17 lines
1873 bytes
1873 bytes
Just upgraded to from BCB5 to BCB6 and changed BDE out for ADO. Now one of
our queries does not work correctly.
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();
This query works fine using the stand query component thru BDE, but does not
work using an ADOquery. Why would this be?
What's wrong with this?
Technical Details
Message-ID:
<3def77f3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!diablo.theplanet.net!kibo.news.demon.net!demon!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc5f9,885632d609f12fd7 X-Google-Attributes: gidfc5f9,public X-Google-Thread: 10698b,885632d609f12fd7 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-12-05 08:12:04 PST Reply-To: "bmkiss67" <bmkiss67@cablespeed.com> From: "bmkiss67" <bmkiss67@aaahawk.com> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.cppbuilder.database.sqlservers Subject: Query problem with MSSQL using ADO Date: Thu, 5 Dec 2002 10:59:37 -0500 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 209.244.85.220 Message-ID: <3def77f3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039103987 209.244.85.220 (5 Dec 2002 07:59:47 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!diablo.theplanet.net!kibo.news.demon.net!demon!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail