Error creating cursor handle
get the following message when call Tquery.sql.open:
Project TestP1dpr.exe raised exception class ENoResultSet
with message 'Error creating cursor handle'.
Process stopped.
Use Step or Run to continue
The following code uses ParamByName to assign the text
of 4 editbox to the fn,usnt.. parameters,
-----------------------------
with qry do
begin
close;
sql.clear;
sql.add('exec update_voyage_dollar :fn,:usnt,:dollar,:dollarnt');
parambyname('fn').asstring:=edtfn.Text;
parambyname('usnt').asstring:=medtvoyusnt.text;
parambyname('dollar').asstring:=medtvoydollarnt.text;
parambyname('dollarnt').asstring:=medtvoydollarnt.text;
open;
end;
the stored procedure code below:
-----------------------------------------
CREATE PROCEDURE update_voyage_dollar
@fn varchar(10),
@usnt decimal,
@dollar varchar(3),
@dollarnt decimal
AS
update voyage set usnt=@usnt,dollar=@dollar,dollarnt=@dollarnt
where fn=@fn
GO
--
[m [1;31m? ?:?Ei??aoo? bbs.yeskw.com?E[FROM: dns.hiperfect.com] [m