Re: Informix Stored Procedures
Posted in 1996
Are you using ISQL or DB-Access to create the stored procedure?
I'd guess you are using ISQL, and ISQL does not understand the
semi-colons which occur part way through a complex CREATE PROCEDURE
statement -- it thinks they mark the end of statements. So, it is
submitting the text:
CREATE PROCEDURE test_proc() RETURNING CHAR(90);
as a complete statement, and this is clearly a syntax error to the Engine.
The fix is to use DB-Access. There are no plans to upgrade ISQL to
understand CREATE PROCEDURE statements.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
}From: ckickel@cyberhighway.net (Craig Kickel)
}Date: Tue, 26 Mar 1996 18:24:37 GMT
}X-Informix-List-Id: <list.9192>
}
}On 26 Mar 1996 00:05:11 GMT, you wrote:
}}I [...] am trying to write my first stored procedure [but] I keep getting
}}a syntax error (-201). I am using Informix-Online Verson 5.
}}
}}CREATE PROCEDURE test_proc ()
}} RETURNING CHAR(90) ;
}}
}} DEFINE profile CHAR(90) ;
}}
}} SELECT database_profile
}} INTO profile
}} FROM "csa".pfsec_db ;
}}
}} RETURN profile ;
}}
}}END PROCEDURE ;
}}
}}I have successfully created the stored procedure without any code between
}}the create statement and the end procedure statement, but as soon as I
}}include any other lines in between I get the error.
}
} I typed in your example procedure and it was stored and ran without
}error. [...]
}
}Are you certain that what appears in your mail is what you're typing?
}On what line and on what character does it say the error occurred?
}(BTW, I tested this on a 5.01.UD2)