I have a mystrdprc with 7 params
CREATE DEFINER=`root`@`%` PROCEDURE `getnext`(
inout `picid` int(11) ,
out `filename` varchar(100),
`process` int(11),
`Step` int(11),
`Taskid` int(11),
`typer` int(11),
`toid` int(11)
)
BEGIN
if `process` = 3 then /* 3 码流程 */
case step
when 0 then
begin
update `state` set `k0`=`typer`, `s0`=1, `st0`=now()
where `data_id` between `picid` and `toid` and `Task_ID`=`taskid` and `s0`=0 and k1 `typer` limit 1;
select `data_id`, `PicName` into `picid`, `filename`
from `state`
where `data_ID` between `picid` and `toid` and `s0`=1 and `k0`=`typer` limit 1;
end;
when 1 then
begin
update `state` set `k1`=typer, `s1`=1, st1=now()
where `data_id` between `picid` and `toid` and `Task_ID`=`taskid` and `s1`=0 and k0 `typer` limit 1;
select `pic_id`, `PicName` into `picid` , `filename`
from `state`
where `data_ID` between `picid` and `toid` and `s1`=1 and `k1`=`typer` limit 1;
end;
when 2 then
begin
update `state` set `k2`=typer, `s2`=1, st2=now()
where `pic_id` between `picid` and `toid` and `Task_ID`=taskid and s0=2 and s1=2 and `s2`=0 and k0 `typer` and k1 `typer`limit 1;
select `data_id`, `PicName` into `picid` , `filename`
from `state`
where `data_ID` between `picid` and `toid` and `s2`=1 and `k2`=`typer` limit 1;
end;
end case;
else /* 2 码流程 */
case step
when 1 then
begin
update `state` set `k1`=typer, `s1`=1, st1=now()
where `Task_ID`=taskid and `s1`=0 and `pic_id` between `picid` and `toid` limit 1;
select `data_id`, `PicName` into `picid` , `filename`
from `state`
where `data_ID` between `picid` and `to_id` and `s1`=1 and `k1`=`typer` limit 1;
end;
when 2 then
begin
update `state` set `k2`=typer, `s2`=1, st2=now()
where `pic_id` between `picid` and `toid` and `Task_ID`=taskid and `s2`=0 and k1 `typer` limit 1;
select `data_id`, `PicName` into `picid` , `filename`
from `state`
where `data_ID` between `picid` and `toid` and `s2`=1 and `k2`=`typer` limit 1;
end;
end case;
end if;
/*
set @picid = 99990;
SET @file1='';
call `getnext`( @picid, @file1, 3, 0, 0, 1234, 100000);
select @picid, @file1;
*/
END;
when I use TMystrdPrc, I cannot uses
"mystrdprc1.ParamBynane('picid').AsInteger := 0;"
to set param values, why?
delphi 2010 & mydac 5.9.055
About TMystrdPrc
with message "Parameter 'picid' not found'.
but I show Parameter with:
mmo1.Lines.Text :=
mystrdprc1.Params[0].Name + #13 +
mystrdprc1.Params[1].Name + #13 +
mystrdprc1.Params[2].Name + #13 +
mystrdprc1.Params[3].Name + #13 +
mystrdprc1.Params[4].Name + #13 +
mystrdprc1.Params[5].Name + #13 +
mystrdprc1.Params[6].Name;
result is:
`picid`
`filename`
`process`
`Step`
`Taskid`
`typer`
`toid`
but I show Parameter with:
mmo1.Lines.Text :=
mystrdprc1.Params[0].Name + #13 +
mystrdprc1.Params[1].Name + #13 +
mystrdprc1.Params[2].Name + #13 +
mystrdprc1.Params[3].Name + #13 +
mystrdprc1.Params[4].Name + #13 +
mystrdprc1.Params[5].Name + #13 +
mystrdprc1.Params[6].Name;
result is:
`picid`
`filename`
`process`
`Step`
`Taskid`
`typer`
`toid`