Hi, I am trying to insert into a table by using a query. I am using
parameters to load the values into the query, and so I first close the
query, then set the parameter values and then I call the open statement and
I get the following error:
Project *.exe caused exception class ENoResultSet with message 'Error
creating cursor handle'.
However, when I go into Enterprise manager and look at the data, my data did
insert.
Here is my query:
INSERT INTO EQHistory(Eq_job_nbr, Eq_id_nbr, Eq_date, Eq_hours, Eq_phase,
Eq_technician,
Eq_task_code, Eq_month, Eq_comments, Eq_paperwork, Eq_nopaperwork, [User],
Webtrans)
VALUES(:contract, :id, :date, :hours, :phase, :tech, :task, :month,
:comments, :paperwork,
:nopaperwork, :username, :webtrans)
Here is my code:
DM.InsEqhistory.close;
DM.InsEqhistory.ParamByName('Contract').AsString :=
contract;
DM.InsEqhistory.ParamByName('id').AsString := id;
DM.InsEqhistory.ParamByName('date').AsString := date;
DM.InsEqhistory.ParamByName('hours').Asfloat := hours;
DM.InsEqhistory.ParamByName('phase').AsInteger := phase;
DM.InsEqhistory.ParamByName('tech').AsString := tech;
DM.InsEqhistory.ParamByName('task').AsString := '';
DM.InsEqhistory.ParamByName('month').AsString := month;
DM.InsEqhistory.ParamByName('comments').AsString :=
comments;
DM.InsEqhistory.ParamByName('paperwork').AsString :=
paperwork;
DM.InsEqhistory.ParamByName('nopaperwork').AsString :=
nopaperwork;
DM.InsEqhistory.ParamByName('username').AsString :=
user;
DM.InsEqhistory.ParamByName('webtrans').AsString :=
webtrans;
DM.InsEqhistory.Open;
DM.InsEqhistory.Close;
Any help will be greatly appreciated.
BTW, I am using SQL7.0, D4, BDE 5.11
--
Dwaine Horton
York Strategic Accounts
Programmer
dwaine.hor...@york.com
800-438-4447x2318
704-357-3434(f)