Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: string matching in pro*c

Re: string matching in pro*c

From: Hakan <heren_at_home.com>
Date: 2000/08/07
Message-ID: <398F3409.656AE45C@home.com>#1/1

hi,

define in exec sql ... declare section. an example is in the following: EXEC SQL BEGIN DECLARE SECTION
  VARCHAR recvstring[5]; // field length + 1 EXEC SQL END DECLARE SECTION; then compile by pro*c

Hakan

Bhavin Shah wrote:
>
> Hi,
>
> I'm having problems matching strings in our db within
> a pro*c (c++/linux/oracle 8.1.6) program. If I declare
> a host variable to get a string and try and use it in a
> select statement, I cannot get a match.
>
> It's something like this:
>
> char recvstring[5];
> strcpy(recvstring, "1234");
> select ... into : ... where id=:recvstring;
>
> Is it because sql strings use '' or am I missing something?
> Thanks in advance.
>
> Bhavin
  Received on Mon Aug 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US