Thread: ECPG and SQL function

ECPG and SQL function

From
Michaël Fiey
Date:
Hi,
I wrote a sql funtion which accept 1 varchar in and return an int4.
I try to use this function in a C program with ECPG.
The command : "exec sql select myfunction('myargument') into :res" works fine
but :
"mycommand=select myfonction('mychangingargument')
sql prepare myprep from mycommand
and sql exec execute myprep" does not
and
"mycommand=select myfonction('mychangingargument') into :res
sql prepare myprep from mycommand
and sql exec execute myprep using :res" does not any more.
 
I got the error "Too few argument" or "Too many argument".
 
thanks for any kind of help.
 

Re: ECPG and SQL function

From
Michael Meskes
Date:
On Thu, Aug 24, 2000 at 08:57:00PM +0200, Michaël Fiey wrote:
> I try to use this function in a C program with ECPG.
> The command : "exec sql select myfunction('myargument') into :res" works fine
> but :
> "mycommand=select myfonction('mychangingargument')

I guess the 'o' instead of the 'u' is just a typo, but in general it would
be better if you send us/me a small test case or at least a part of the
source code. The reason may be a missing character or anything like that.

Also the translated file would be helpful.

Of course it may as well be a bug. :-)

Michael
--
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!