Article View: borland.public.cppbuilder.database.ado
Article #3203Query problem with MSSQL using ADO
From: bmkiss67
Date: Thu, 05 Dec 2002 16:01
Date: Thu, 05 Dec 2002 16:01
17 lines
1878 bytes
1878 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:
<3def7876@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!66.150.105.36.MISMATCH!newsfeed-east.nntpserver.com!nntpserver.com!eusc.inter.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: 10698b,885632d609f12fd7,start X-Google-Attributes: gid10698b,public X-Google-Thread: fc5f9,885632d609f12fd7,start X-Google-Attributes: gidfc5f9,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 11:01:48 -0500 Lines: 21 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: <3def7876@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039104118 209.244.85.220 (5 Dec 2002 08:01:58 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!66.150.105.36.MISMATCH!newsfeed-east.nntpserver.com!nntpserver.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail