各位大虾
我调用的是储存过程,用的是用Adoconnection 连接数据库
adoStoredProc 连接Adoconnection
PeocedureName 连接存储过程名 RegionInsert;1为什么多出来一个;1 这是为什么呀
连接了储存过程名之后
parameters 的参数自动都添加上了
就是不能激活AdoPro 就出现 AdoPro Cannot PerForm this Operation on a closed dataset
这个问题
请问为什么
还有什么地方要该吗
我调用的是储存过程,用的是用Adoconnection 连接数据库
adoStoredProc 连接Adoconnection
PeocedureName 连接存储过程名 RegionInsert;1为什么多出来一个;1 这是为什么呀
连接了储存过程名之后
parameters 的参数自动都添加上了
就是不能激活AdoPro 就出现 AdoPro Cannot PerForm this Operation on a closed dataset
这个问题
请问为什么
还有什么地方要该吗
AdoPro.Active;
楼上的,不行呀
(@RegionDes Nchar(50),
@RegionId INteger output
)
AS set Nocount off;
/* select @RegionId=max(RegionID)+1 From Region;*/
select @RegionId = isnull(max(RegionID)+1,count(*)+1) From Region;
Insert into Region(RegionId,RegionDes)
values(@RegionId,@RegionDes);
GO
with ADOPro do
begin
close;
// AdoPro.Active :=true;
AdoPro.ProcedureName:='RegionInsert';
AdoPro.Refresh;
i:=AdoPro.Parameters.ParamValues['@RegionID'];
Parameters.ParamByName('@RegionID').Value:=0;
Parameters.ParamByName('@RegionDes').Value:=edit1.Text;
Parameters.ParamByName('@RegionID').Value:=0;
AdoPro.Prepared;
adoPro.ExecProc; end;
你这句是什么意思呀,没看明白。
为何把参数据付给i呢。