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

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP! Going crazy: OCI bind strange results

Re: HELP! Going crazy: OCI bind strange results

From: Jagdish Rajan <jagdish_at_worldnet.att.net>
Date: Sun, 03 May 1998 21:34:00 GMT
Message-ID: <6iinr8$6us@bgtnsc01.worldnet.att.net>


Rog,
What are your bind datatypes? I'm pretty sure :surname is a SQLT_CHR but what is :zip3? With the SQLT_CHR you must specify the correct size of the host variable for the comparison to be correct - this should not include any null bytes if they are present in your host variable being bound.

Jagdish

On Fri, 1 May 1998 14:36:47 -0600, "Roger Loeb" <rloeb_at_martech.com> wrote:

>I have a simple SELECT statement with two input variables, e.g., "SELECT
>FROM OURTABLE WHERE ZIP3=:zip3 AND LASTNAME LIKE :surname"
>
>I bind this two variables to input data targets (of the appropriate length)
>and execute the statement. I get no rows back. If I hard code the
>statement with the SAME data, e.g., SELECT FROM OURTABLE WHERE ZIP3=731 AND
>LASTNAME LIKE 'LAB%'" (that's a single quote, then a double quote), then I
>get 400 rows back.
>
>I know the bind is working because I can see the bind data in the TRACE
>file.
>
>I've been fighting this for two days, and I'm going crazy (crazier?) Any
>ideas gratefully accepted.
>
>Rog
>
>
>--
>roger@_delete_this_to_reply_.martech.com
>
>
Received on Sun May 03 1998 - 16:34:00 CDT

Original text of this message

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