Re: Pro*C -- How to pass a value into a Dynamic SQL (Method 3).

From: S. Driggs <stan_at_inetgw.fsc.ibm.com>
Date: 1995/03/30
Message-ID: <3lemiu$alq_at_lfsserv1.fsc.ibm.com>#1/1


In article <3kvv3o$fhj_at_Twain.MO.NET>, bwit_at_MO.NET (Bob Withers) writes:
|>
|> How about:
|>
|> sqlstmt.len = sprintf((char *) sqlstmt.arr,
|> "SELECT distinct %s FROM %s",
|> col_name, tab_name);
|>
|> ....
|>
|> EXEC SQL PREPARE S FROM :sqlstmt;
|>
|> EXEC SQL DECLARE C CURSOR FOR S;
|>
|> EXEC SQL OPEN C;
Is there any way to avoid hardcoding the cursor name? I'd like to write a SQL server that can process SQL requests from multiple clients, and I'd like to be able to have more than one cursor at a time. How can I do this short of spawning child processes for each client? Please e-mail me, as our news server has been flakey.

TIA, Stan Received on Thu Mar 30 1995 - 00:00:00 CEST

Original text of this message