Subject | RE: [firebird-support] MESSAGE LENGTH ERROR, ISC ERROR CODE:335544358 |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-02-21T10:35:53Z |
Moreover, I think SUSPEND should be used with selectable stored procedures, you are calling the procedure as an executable procedure.
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 21. februar 2008 11:29
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] MESSAGE LENGTH ERROR, ISC ERROR CODE:335544358
At 08:51 PM 21/02/2008, you wrote:
You define two output parameters but the only part of your code that assigns something to them is inside a conditional branch.
Now I *should* shout this: initialise your output variables! ;-)
./heLen
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 21. februar 2008 11:29
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] MESSAGE LENGTH ERROR, ISC ERROR CODE:335544358
At 08:51 PM 21/02/2008, you wrote:
>Hi all, I get that error while doing the following:There's no need to SHOUT!
>
>execute procedure p_newsubscriber2(0561707070,1,10074);
>
>Thats the SP:
>
>SET TERM ^^ ;
>CREATE PROCEDURE P_NEWSUBSCRIBER2 (
> ISUBSCRIBER_ID VarChar(40),
> IOBJECT SmallInt,
> ITM_ID Integer)
> returns (
> OBJECT_TYPE VarChar(5),
> OBJECT_ID Integer)
>AS
>BEGIN
>
> IF (ITM_ID IS NULL) THEN ITM_ID = 10074;
>
> INSERT INTO CUSTOMER (CUSTOMER_ID,COUNTRYCODE,CUST_CODE)
> VALUES (NULL,'CH',:ISUBSCRIBER_ID);
>
> INSERT INTO CONTRACTS
>(CO_ID,CUSTOMER_ID,DATE_CREATED,DATE_SIGNED,DATE_ACTIVE,CO_CODE)
> SELECT
>NULL,C.CUSTOMER_ID,CURRENT_DATE,CURRENT_DATE,CURRENT_DATE,:ISUBSCRIBER
>_ID
> FROM CUSTOMER C WHERE C.CUST_CODE = :ISUBSCRIBER_ID;
>
> INSERT INTO CO_VOICEDATA (COV_ID,CO_ID,DATE_ACTIVE,COV_CODE)
> SELECT NULL,CO.CO_ID,CURRENT_DATE,:ISUBSCRIBER_ID
> FROM CONTRACTS CO WHERE CO.CO_CODE = :ISUBSCRIBER_ID;
>
> INSERT INTO SUBSCRIBER (SUBS_ID,SUBSCRIBER_ID,COV_ID,DATE_ACTIVE)
> SELECT NULL,:ISUBSCRIBER_ID,COV.COV_ID,CURRENT_DATE
> FROM CO_VOICEDATA COV WHERE COV.COV_CODE = :ISUBSCRIBER_ID;
>
> INSERT INTO CO_VOICEDATA_TARIFFS (COV_ID,VALID_FROM,TM_ID)
> SELECT COV.COV_ID,CURRENT_DATE,:ITM_ID
> FROM CO_VOICEDATA COV WHERE COV.COV_CODE = :ISUBSCRIBER_ID;
>
> IF (IOBJECT = 1) THEN
> BEGIN
> SELECT 'C', CUSTOMER_ID FROM CUSTOMER WHERE CUST_CODE
>= :ISUBSCRIBER_ID INTO :OBJECT_TYPE,OBJECT_ID;SUSPEND;
> SELECT 'CO', CO_ID FROM CONTRACTS WHERE CO_CODE
>= :ISUBSCRIBER_ID INTO :OBJECT_TYPE,OBJECT_ID;SUSPEND;
> SELECT 'COV', COV_ID FROM CO_VOICEDATA WHERE COV_CODE
>= :ISUBSCRIBER_ID INTO :OBJECT_TYPE,OBJECT_ID;SUSPEND;
> SELECT 'S', SUBS_ID FROM SUBSCRIBER WHERE SUBSCRIBER_ID
>= :ISUBSCRIBER_ID INTO :OBJECT_TYPE,OBJECT_ID;SUSPEND;
> END
>
>END
> ^^
>SET TERM ; ^^
>
>WHATS UP?
>REGARDS, CHRISTOPH
You define two output parameters but the only part of your code that assigns something to them is inside a conditional branch.
Now I *should* shout this: initialise your output variables! ;-)
./heLen