 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
bmkiss Guest
|
Posted: Thu Feb 17, 2005 4:24 pm Post subject: Parameter problem |
|
|
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
|
Posted: Thu Feb 17, 2005 6:17 pm Post subject: Re: Parameter problem |
|
|
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 |
|
 |
|
|
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
|
|