Embedded SQL & stored procedure. URGENT 
Author Message
 Embedded SQL & stored procedure. URGENT
Hi.
Environment: Win2000, DB2 WG v.7.2
I need to call stored procedure wich returns a result set. A comment in
samples\c\spclient.sqc says

     /* Embedded SQL in C client applications cannot
      * accept single result sets, so do not call
      * the ONE_RESULT_SET stored procedure.
      */

I think it's too bad if i can't call stored procedures returning result
sets. Is there workaraound?

Thanks in advance,
Vadim



Sat, 08 May 2004 13:27:04 GMT
 Embedded SQL & stored procedure. URGENT

   I believe you can do so if your SP uses CLI (ODBC) instead of static
SQL.  There might be a sample in "sqllib\samples\cli".

Quote:

> Hi.
> Environment: Win2000, DB2 WG v.7.2
> I need to call stored procedure wich returns a result set. A comment in
> samples\c\spclient.sqc says

>      /* Embedded SQL in C client applications cannot
>       * accept single result sets, so do not call
>       * the ONE_RESULT_SET stored procedure.
>       */

> I think it's too bad if i can't call stored procedures returning result
> sets. Is there workaraound?

> Thanks in advance,
> Vadim

--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural


Sun, 09 May 2004 01:55:17 GMT
 Embedded SQL & stored procedure. URGENT
CLI programs can definitely return result sets.  There are numerous
examples provided in the doc.  And ... there is a wonderful book
called :DB2 Universal Database Call Level interface Developer's Guide,
by Roger Sanders from McGraw Hill.  ISBN 0-07-134572-8   .... I
believe it's around $60.00 US.

Mairhtin O'Feannag
IMadeThis.com

Quote:

> Hi.
> Environment: Win2000, DB2 WG v.7.2
> I need to call stored procedure wich returns a result set. A comment in
> samples\c\spclient.sqc says

>      /* Embedded SQL in C client applications cannot
>       * accept single result sets, so do not call
>       * the ONE_RESULT_SET stored procedure.
>       */

> I think it's too bad if i can't call stored procedures returning result
> sets. Is there workaraound?

> Thanks in advance,
> Vadim



Sun, 09 May 2004 08:27:58 GMT
 Embedded SQL & stored procedure. URGENT

Quote:

>  Hi.
>  Environment: Win2000, DB2 WG v.7.2
>  I need to call stored procedure wich returns a result set. A comment in
>  samples\c\spclient.sqc says

>       /* Embedded SQL in C client applications cannot
>        * accept single result sets, so do not call
>        * the ONE_RESULT_SET stored procedure.
>        */

>  I think it's too bad if i can't call stored procedures returning result
>  sets. Is there workaraound?

You could use a temp table.

--
Knut Stolze
DB2 UDB Spatial Extender
IBM Silicon Valley Lab



Sun, 09 May 2004 10:43:52 GMT
 Embedded SQL & stored procedure. URGENT
Hi,

Any SP can return result set, but only CLI clients can read them. To return
a result set just open a cursor and return from the SP.

Best regards, Dmitry
www.ispirer.com - Database migration tool for DB2 and Oracle


Quote:
> Hi.
> Environment: Win2000, DB2 WG v.7.2
> I need to call stored procedure wich returns a result set. A comment in
> samples\c\spclient.sqc says

>      /* Embedded SQL in C client applications cannot
>       * accept single result sets, so do not call
>       * the ONE_RESULT_SET stored procedure.
>       */

> I think it's too bad if i can't call stored procedures returning result
> sets. Is there workaraound?

> Thanks in advance,
> Vadim



Sun, 09 May 2004 17:52:43 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Embedded SQL and Stored Procedures

2. Embedded SQL versus stored procedures

3. IL-CHICAGO LOOP-248096--ORACLE-ERWin-C++-Embedded Systems-SQL-Stored Procedures-

4. C (embedded SQL) : receive boolean out-parameter of a stored procedure

5. Transactions - Stored Procedures vs Embedded SQL

6. Stored Procedures vs Embedded SQL

7. Embedded SQL executing a Stored Procedure

8. Q: Performance of Stored procedures vs. Embedded SQL

9. Stored Procedure returning result set to embedded SQL client in C++

10. URGENT - sql server gradually stops executing update stored procedure

11. If..Else Embedded in Stored Procedure

12. Stored procedures and Strings with embedded quotes


 
Powered by phpBB® Forum Software