🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #962

Parameter problem

#962
From: bmkiss
Date: Thu, 17 Feb 2005 16:24
18 lines
1520 bytes
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: <4214c552@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,897a84becfaafc2b,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "bmkiss" <bmkiss67@cablespeed.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Parameter problem
Date: Thu, 17 Feb 2005 11:24:51 -0500
Lines: 21
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: <4214c552@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108657490 68.48.16.112 (17 Feb 2005 08:24:50 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail