Dynamic SQL and Pro*C

From: Shirland Leader <vvega_at_akula.com>
Date: Wed, 21 Aug 2002 20:24:01 -0400
Message-ID: <3D642F21.35721E32_at_akula.com>



Hello,

[Quoted] [Quoted]     I'm a novice pro*C programmer. I have come upon a problem that I cannot resolve. When running a query via a string host variable , Must I use place holders for string variables/numbers etc in teh actualy queury ? I really dont want to ! My data is built around really large structures and I dont know think Dynamic SQL supports Example...

This is what I want to execute:

char *stmt="SELECT EMPNO, EMPNAME where DEPTNO=34";

It seems like im being forced to :

int x=34;

char *stmt="SELECT EMPNO, EMPNAME where DEPNO=:x";

My program generates a statement like the first one above and its dynamic therefore I'll never know how many variables to declare. I've tried using a host array with the value in it but that doesnt seem to work for SELECT statements. Thanks in advance for any help ! Received on Thu Aug 22 2002 - 02:24:01 CEST

Original text of this message