Re: Problem in executing stored procedure.
Posted in 1996
Hi, >Ravi Hubbly wrote: >> >> <SNIP> >> The stored procedure, upon execution, gives an error "Resulting string length >> must be less than or equal to 255". I've got a char variable of length 3000 >> which I am returning from the SP. >> >> CREATE PROCEDURE "sstm".g_wo_sm006a( >> p_wo_no LIKE work_order.wo_no >> ) >> RETURNING >> VARCHAR(9,0), >> VARCHAR(8,0), >> . >> . >> CHAR(3000), -----> This is the return variable which causes the problem >> CHAR(1); > >I hate to point out the obvious.... But... >If you are returning tye CHAR, then why don't you define your >RETURNING clause as returning type CHAR instead of VARCHAR? >VARCHAR is restricted to 255 chars, whereas CHAR allows 32767. > >So I can only imagine that 7.10.UC2 has a bug that ignores this. > >Hope this helps, >-- > >Mark. > Mark, I think you misunderstood the problem. My returning clause does have char[3000]. It does not have varchar as seen by you. I am again putting forward my extract from the SP in more refined format:- CREATE PROCEDURE "sstm".g_wo_sm006a( p_wo_noLIKEwork_order.wo_no ) RETURNING VARCHAR(9,0), VARCHAR(8,0), CHAR(3000), -----> This is the return variable which causes the problem DEFINE lvc_wo_no VARCHAR(9,0); DEFINE lvc_ins_claim VARCHAR(8,0); DEFINE lc_prob_desc CHAR(3000); I am still stuck with this problem. It would be great help if you give some suggestions. Thanks in advance.. Ravi Hubbly ravi_hubbly@hotmail.com --------------------------------------------------------- Get Your *Web-Based* Free Email at http://www.hotmail.com ---------------------------------------------------------