Article View: borland.public.cppbuilder.database.ado
Article #963Re: Parameter problem
From: bmkiss
Date: Thu, 17 Feb 2005 18:17
Date: Thu, 17 Feb 2005 18:17
28 lines
1866 bytes
1866 bytes
Ok, I figered it out. It seems to work now.
"bmkiss" <bmkiss67@cablespeed.com> wrote in message
news:4214c552@newsgroups.borland.com...
> I am trying to convert an app from using BDE to ADO. I've run into a
> parameter problem I don't understand. I get an error that says:
ADOqHistory:
> Parameter 'HistoryDay' not found.
> Here is the code:
> ADOqHistory->Close();
> ADOqHistory->SQL->Clear();
> ADOqHistory->SQL->Add("set identity_insert HistorySchedule on");
> ADOqHistory->SQL->Add("insert into historyschedule
> (uid,MDay,CF,Background,Tag1,Tag2,Tag3,Tag4)");
> ADOqHistory->SQL->Add("select * from schedule where MDay <
:HistoryDay");
> ADOqHistory->SQL->Add("set identity_insert HistorySchedule off");
> ADOqHistory->Parameters->ParamByName("HistoryDay")->Value = HistoryDate;
> ADOqHistory->Prepared = true;
> ADOqHistory->ExecSQL();
>
> What am I doing wrong?
>
> Thanks
>
>
>
Technical Details
Message-ID:
<4214dfd0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4214c552@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,897a84becfaafc2b X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "bmkiss" <bmkiss67@cablespeed.com> Newsgroups: borland.public.cppbuilder.database.ado References: <4214c552@newsgroups.borland.com> Subject: Re: Parameter problem Date: Thu, 17 Feb 2005 13:17:47 -0500 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 68.48.16.112 Message-ID: <4214dfd0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1108664272 68.48.16.112 (17 Feb 2005 10:17:52 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail