Re: IDS 11.5



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.


Relevant Pages

  • Re: Informix 11.5 worse than 11.1 and 10?
    ... REALLY love the index self join optimization and dynamic SQL in SQL works ... Oninit ... IIUG Board of Directors ... Please keep in mind that my own opinions are my own opinions and ...
    (comp.databases.informix)
  • Re: Program to pull 4gos back out of a 4gi?
    ... IIUG Board of Directors ... Please keep in mind that my own opinions are my own opinions and ... do not reflect on my employer, Advanced DataTools, the IIUG, nor any other ... You should be assigning copies of those strings into data ...
    (comp.databases.informix)
  • Re: is possible multiple instances with the same dbspace?
    ... Oninit ... IIUG Board of Directors ... Please keep in mind that my own opinions are my own opinions and ... Servers using the optional MACH11 feature available since 11.10. ...
    (comp.databases.informix)
  • Re: virtual share memory too big ?
    ... Oninit ... IIUG Board of Directors ... Please keep in mind that my own opinions are my own opinions and ... I have set the onconfig parameter SHMVIRTSIZE at 640 MB and SHMADD at ...
    (comp.databases.informix)
  • Re: IDS 11.5xC7
    ... IIUG Board of Directors ... Please keep in mind that my own opinions are my own opinions and ... do not reflect on my employer, Advanced DataTools, the IIUG, nor any other ... nor on the IBM trial downloads ...
    (comp.databases.informix)