S
SevenOrient
Unregistered / Unconfirmed
GUEST, unregistred user!
设计时候,已经设计好Databasename和StoredProcName属性,并且把TStroreProc的参数类型也设置好
var StrName,StrIP:String;
Secondi:integer;
begin
//各变量已经赋值
Self.StoredProc1.Close;
//self.StoredProc1.Params.Clear ;
//storedProc1.ParamByName('@commName').ParamType := ptInput;
//storedProc1.ParamByName('@commName').DataType := ftString;
StoredProc1.paramByName('@commName').Value :=StrName;
//storedProc1.ParamByName('@commIP').ParamType := ptInput;
//storedProc1.ParamByName('@commIP').DataType := ftString;
StoredProc1.paramByName('@commIP').value :=StrIP;
//storedProc1.ParamByName('@validIdleSecond').ParamType := ptInput;
//storedProc1.ParamByName('@validIdleSecond').DataType := ftinteger;
StoredProc1.paramByName('@validIdleSecond').value :=Secondi;
//storedProc1.ParamByName('@FAILUREREASON').ParamType := ptResult;
//storedProc1.ParamByName('@FAILUREREASON').DataType := ftString;
//storedProc1.ParamByName('@OPERATERSTATE').ParamType := ptResult;
//storedProc1.ParamByName('@OPERATERSTATE').DataType := ftinteger;
self.StoredProc1.ExecProc;//提示错误:错误参数!
//self.StoredProc1.GetResults;
Str:=StoredProc1.ParamByName('@FAILUREREASON').AsString;
Tempi := StoredProc1.ParamByName('@OPERATERSTATE').Asinteger;
为什么运行总是提示错误:错误参数?
var StrName,StrIP:String;
Secondi:integer;
begin
//各变量已经赋值
Self.StoredProc1.Close;
//self.StoredProc1.Params.Clear ;
//storedProc1.ParamByName('@commName').ParamType := ptInput;
//storedProc1.ParamByName('@commName').DataType := ftString;
StoredProc1.paramByName('@commName').Value :=StrName;
//storedProc1.ParamByName('@commIP').ParamType := ptInput;
//storedProc1.ParamByName('@commIP').DataType := ftString;
StoredProc1.paramByName('@commIP').value :=StrIP;
//storedProc1.ParamByName('@validIdleSecond').ParamType := ptInput;
//storedProc1.ParamByName('@validIdleSecond').DataType := ftinteger;
StoredProc1.paramByName('@validIdleSecond').value :=Secondi;
//storedProc1.ParamByName('@FAILUREREASON').ParamType := ptResult;
//storedProc1.ParamByName('@FAILUREREASON').DataType := ftString;
//storedProc1.ParamByName('@OPERATERSTATE').ParamType := ptResult;
//storedProc1.ParamByName('@OPERATERSTATE').DataType := ftinteger;
self.StoredProc1.ExecProc;//提示错误:错误参数!
//self.StoredProc1.GetResults;
Str:=StoredProc1.ParamByName('@FAILUREREASON').AsString;
Tempi := StoredProc1.ParamByName('@OPERATERSTATE').Asinteger;
为什么运行总是提示错误:错误参数?