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

Home -> Community -> Usenet -> c.d.o.tools -> NVARCHAR2 and Pro*C

NVARCHAR2 and Pro*C

From: Atul Pinge <apinge_at_carl.org>
Date: Mon, 11 Jun 2001 19:01:46 GMT
Message-ID: <3B2516F8.11F7762B@carl.org>

Hello everybody,

I have a table called CSISBN in my database defined as following:

ISBN NVARCHAR2(10)
BID NUMBER(10) Now in SQL*Plus I can access the records by query:

select * from csisbn where isbn = N'1234';

The output is:

ISBN BID
---------- ---------
1234 1234

But how can I access the same record using Pro*C? I'm using Oracle Dynamic SQL method 4. If I use the sample program and use the following query:

select * from csisb where isbn = :isbn;

the program prompts for the value of ISBN and if I enter 1234, I get following error:

ORA-12704: character set mismatch

The NLS settings on my database are as following:

PARAMETER                      VALUE
------------------------------ ------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-YY
NLS_DATE_LANGUAGE              AMERICAN
NLS_CHARACTERSET               US7ASCII
NLS_SORT                       BINARY
NLS_NCHAR_CHARACTERSET         US7ASCII
NLS_RDBMS_VERSION              8.0.5.0.0

Any help would be appreciated.

Thanks in advance.
Atul Received on Mon Jun 11 2001 - 14:01:46 CDT

Original text of this message

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