Re: CAlling SP in Informix - 4gl
Posted in 1999
From: krishnakn@yahoo.com
>
>How do I call a Stored procedure in 4gl
>
>Is it preparing a statement with "execute procedure proc_nam() "
>and executing it.
Yep.
>If so, How do I access the return value from Store procedure in 4gl program
>???
FETCH preparename INTO p_variable? (I'm at home, no manuals handy)
>And,
>
>How do Check whether any data exist in a table for a given where clause
>????
SELECT COUNT(*) FROM table WHERE where_clause.
>Do I have to create a cursor for the select statement and count the number
>of
>rows ????? Or If I have "SELECT count(*) from ...." then how do I get the
>value back in the execute statement ??????
LET sql_stmt = "SELECT COUNT(*) FROM table WHERE ", where_clause
PREPARE ex_stmt FROM sql_stmt
OPEN ex_stmt
FETCH ex_stmt INTO p_count
HTH.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com