Re: *********** Pro*C Question *********
From: <vkwan1_at_vaxa.hofstra.edu>
Date: 22 Jun 94 14:16:08 EST
Message-ID: <1994Jun22.141608.4159_at_vaxa>
>
> Sure enough the query in program 2 returns nothing! When
> I print my_string on both the programs, they give the identical
> value.
>
Date: 22 Jun 94 14:16:08 EST
Message-ID: <1994Jun22.141608.4159_at_vaxa>
In article <2u0ff1$sij_at_gaia.cc.gatech.edu>, badri_at_cc.gatech.edu (badri) writes:
> Dear Friends:
>
> I am facing a baffling Pro*C behavior. I do the following
> in Pro*C.
>
> Program 1:
> char my_string[16];
> VARCHAR sqlcmd[256];
>
> sprintf (sqlcmd.arr, "insert into my_table values
> ('%s')", my_string);
> sqlcmd.len=strlen(sqlcmd.arr);
|-- sqlcmd.len>
>
> Program 2:
> char my_string[16];
>
> EXEC SQL DECLARE C1 CURSOR FOR
> SELECT * FROM my_table
> WHERE only_attribute = my_string;
>
> Sure enough the query in program 2 returns nothing! When
> I print my_string on both the programs, they give the identical
> value.
>
I have the same problem in this case too. It looks like Oracle Proc*C
doesn't suport wild card.
However, if I am wrong, or if anyone has a solution, please post it.
I will appreciate that.
V. Kwan
Oracle Database Application Developer
vkwan1_at_vaxb.hofstra.edu
Received on Wed Jun 22 1994 - 21:16:08 CEST