Pro*C query problem
Date: 1995/05/26
Message-ID: <3q59rl$9qd_at_mercury.kingston.ac.uk>#1/1
I am having problems trying to get a query in my Pro*C program to acheive what I want it to. The query is as follows -
EXEC SQL SELECT CNAME, CCLENGTH
INTO cname, clength
FROM COURSES WHERE CNAME=:name;
where name is a string whose contents are variable on each invocation of the query.
I have seen in the Pro*C users guide this being done, but only where name (or equivalent) is an integer...I need it to be a string. The above code doesn't produce any errors, but when I set name to a value that I know is in the table, the call still returns nothing for the other variables....am I doing this right???? Is it possible to use strings in the WHERE declaration??? Can anyone help??
Please mail me direct, I would appreciate any feedback on this, as the main reason for me using Oracle is that I can use it to search for data, and just have my program manipulate it.
Many thanks in advance to any replies,
Cheers,
Nick. Received on Fri May 26 1995 - 00:00:00 CEST