Re: Pro*C query problem

From: Donita Hilfinger <hilfinge_at_rose.rsoc.rockwell.com>
Date: 1995/05/31
Message-ID: <3qhrcs$ja0_at_popeye.jsc.nasa.gov>#1/1


The only way I have found to compare strings is as follows:

char *name; /* the sql value to be compared; make sure mode=oracle*/

name = strtok(buffer, " ");
EXEC SQL SELECT CNAME, CCLENGTH

         INTO cname, clength
         FROM COURSES WHERE CNAME=:name;

In article 9qd_at_mercury.kingston.ac.uk, ee_d304_at_dcs.king.ac.uk (Nick Bailey) writes:
> 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.
>
> (STUFF DELETED HERE)
>
> Cheers,
>
> Nick.
>
>
Received on Wed May 31 1995 - 00:00:00 CEST

Original text of this message