BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parameter problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO)
View previous topic :: View next topic  
Author Message
bmkiss
Guest





PostPosted: Thu Feb 17, 2005 4:24 pm    Post subject: Parameter problem Reply with quote



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



Back to top
bmkiss
Guest





PostPosted: Thu Feb 17, 2005 6:17 pm    Post subject: Re: Parameter problem Reply with quote



Ok, I figered it out. It seems to work now.


"bmkiss" <bmkiss67 (AT) cablespeed (DOT) com> wrote

Quote:
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






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.