Re: IDS 11.5
- From: "Art Kagel" <art.kagel@xxxxxxxxx>
- Date: Fri, 24 Oct 2008 10:35:16 -0400
Oh, if you are using any IDS release prior to 11.50, Dynamic SQL is not
supported except using the Exec Datablade which uses different syntax.
Art
On Fri, Oct 24, 2008 at 10:34 AM, Art Kagel <art.kagel@xxxxxxxxx> wrote:
VERSION AND PLATFORM INFORMATION ARE CRITICAL IF YOU EXPECT A USEFUL
ANSWER!
If you are using IDS 11.50 which DOES support dynamic SQL in SPL stored
procedures, the problem is the colon (:) preceding the function variable
iGod. Colon is ONLY used to identify host variables in ESQL/C in SPL local
variables are recognized by syntax.
As an asside, this is why it is generally a bad idea to name SPL variables
the same as table columns as there are situations where it is not clear to
the parser whether you mean a column or the local var and the parser will
invariable not devine you true intentions. I use the convention
"l_<columname>" when I want a local var to be named like the table column
whose value it will receive/supply.
Art
On Fri, Oct 24, 2008 at 4:11 AM, O_Caj <just_send@xxxxxxxx> wrote:
Hi to all.
I'm have a problem with creating stored procedure that use Dinamy SQL.
Example, when I try to create a procedur:
CREATE PROCEDURE "informix".test( )
DEFINE iGod SMALLINT;
LET iGod = 2003;
PREPARE stmt FROM 'INSERT INTO godine(iGodina) VALUES (?)';
EXECUTE stmt USING :iGod;
return;
END PROCEDURE
I'm get a syntax error but when I comment EXECUTE part then everithing
goes OK. It's also OK when I use EXECUTE IMMEDIATE statement but then I
cant use params.
Can you please suggest me what I'm doing wron (and please forgive me my
alfull english)
_______________________________________________
Informix-list mailing list
Informix-list@xxxxxxxx
http://www.iiug.org/mailman/listinfo/informix-list
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@xxxxxxxx)
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Oninit, the IIUG, nor any other
organization with which I am associated either explicitly or implicitly.
Neither do those opinions reflect those of other individuals affiliated
with any entity with which I am affiliated nor those of the entities
themselves.
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@xxxxxxxx)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
- References:
- IDS 11.5
- From: O_Caj
- IDS 11.5
- Prev by Date: Re: UK Informix User Group meeting, 13 November, Bicester
- Next by Date: On "left join"clause
- Previous by thread: Re: IDS 11.5
- Next by thread: UK Informix User Group meeting, 13 November, Bicester
- Index(es):
Relevant Pages
|