Re: Pro*C:How to do "where column =:char_host_var" ?

From: Scott Urman <surman_at_wwsun10.us.oracle.com>
Date: 13 Oct 1994 19:58:29 GMT
Message-ID: <37k3h5$k11_at_dcsun4.us.oracle.com>


In article <37bcd8$ojk_at_raffles.technet.sg>, scornd11_at_solomon.technet.sg (Nicholas Wee) writes:
|> Jodi Showers (jshowers_at_cmi.on.ca) wrote:
|>
|> : Always declare :char_host_var as VARCHAR(!char) - you'll get
|> : unpredictable results otherwise.
|>
|> Thanks everyone who replied to my request. It was great getting a
|> varied range of answers to the problem faced. I've managed to
|> try out some of the suggested solutions and Jodi Showers
|> has summed it up quite aptly:
|>
|> YOU GET UNPREDICTABLE RESULTS IF U DON'T USE VARCHAR HOST VARIABLES.
|>

It's not that you get unpredictable results, you just need to be aware of the different behavior of different character types. The behavior depends on the type of the variable, as well as whether MODE=ORACLE or MODE=ANSI. varchars are 'predictable' because their behavior doesn't depend on MODE, like the behavior of char[n] variables does. Also note that the precompiler treats char * and char[n] differently. Received on Thu Oct 13 1994 - 20:58:29 CET

Original text of this message