Dynamic Sql with Informix
Posted in 1998
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Data Types & Schema Design
Since Informix SPL does not support dynamic SQL we are forced to dynamically
create stored procedures on the fly from the application. The problem that I
am running into when using the Informix 2.80 drivers is getting 'General
syntax' errors when doing the prepare/execute or direct execute of the stored
procedure to get it created. The intersolv 3.01 drivers work, however we are
working under the constraint of using Informix 2.80 drivers.
The problems are as follows:
With the 2.80.0005 drivers
--------------------------------------
create procedure foo ()
begin work;end procedure;
and...
create procedure selBreak ()define id2 varchar(13);
foreach
select bar.id into id2 from foo, bar delete from bar where id = id2;
end foreach
end procedure;
With the 2.80.069999 drivers
-----------------------------------------
create procedure foo ()
begin
end
end procedure;
These both get general syntax errors through odbc, while working directly
through informix. Does anyone know of any workarounds to get these stored
procedures loaded through ODBC?
Any help would be appreciated.
Thanks,
Kevin Badinger
kbadinger@jdriscoll.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum