Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: string matching in pro*c
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
![]() |
![]() |