我有一个存储过程TEMPDATA_AUTO_TRANS,其中有一个参数v_timestr,现在我用Tstoredproc控件,
在用参数时,如果在Tstoredproc控件的属性面板设定Params时,运行正常,这说明我的存储过程正确,但动态的设定Params时运行总是有错:参数'v_timestr' 找不到
Storedproc1:parameter'v_timestr' not found;我有语句如下:
storedproc1.StoredProcName:='TEMPDATA_AUTO_TRANS';
storedproc1.Params.ParamByName('v_timestr').AsString:='aa';
if storedproc1.Prepared=false then storedproc1.Prepare;
storedproc1.ExecProc;
请问各位问题出在什么地方。我的数据库是Oralce9.0
在用参数时,如果在Tstoredproc控件的属性面板设定Params时,运行正常,这说明我的存储过程正确,但动态的设定Params时运行总是有错:参数'v_timestr' 找不到
Storedproc1:parameter'v_timestr' not found;我有语句如下:
storedproc1.StoredProcName:='TEMPDATA_AUTO_TRANS';
storedproc1.Params.ParamByName('v_timestr').AsString:='aa';
if storedproc1.Prepared=false then storedproc1.Prepare;
storedproc1.ExecProc;
请问各位问题出在什么地方。我的数据库是Oralce9.0
storedproc1.Prepared=true;
storedproc1.Params.ParamByName('v_timestr').AsString:='aa';
storedproc1.ExecProc;
ADOStoredProc1.ProcedureName := getWuJintablename(s)+'_add;1';
ADOStoredProc1.Parameters.Refresh ;曾经困扰了我三个月的问题:),关键是第三句
ADOStoredProc1.ProcedureName := getWuJintablename(s)+'_add;1';
ADOStoredProc1.Parameters.Refresh ;曾经困扰了我三个月的问题:),关键是第三句
storedproc1.StoredProcName:='TEMPDATA_AUTO_TRANS';
storedproc1.ParamByName('v_timestr').AsString:='aa';
if storedproc1.Prepared=false then storedproc1.Prepare;
storedproc1.ExecProc;
storedproc1.unprepare;
storedproc1.close;
//storedproc1.Params.ParamByName('v_timestr').AsString:='aa';
storedproc1.Params.CreateParameter('@v_timestr',ftstring,pdInput,255,'aa');
if storedproc1.Prepared=false then storedproc1.Prepare;
storedproc1.ExecProc;