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 -> Re: Problems with a stored procedure , Oracle and JDBC

Re: Problems with a stored procedure , Oracle and JDBC

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 31 May 2001 20:43:43 +0200
Message-ID: <thd42td9f0juc2@beta-news.demon.nl>

"Andrea Bruschina" <brucext_at_tin.it> wrote in message news:dDvR6.6394$vt.92765_at_news1.tin.it...
> Problems with a stored procedure and JDBC
>
> I have this problem:
>
> I have a stored procedure (written in PL/SQL) that do something like this
> (on a Oracle server 8i):
>
> ....
> First := 5 + 5;
> Second := 3
>
> -- Result is (NUMBER 6,3)
> Result := First*100/Second;
>
> ...
>
> q:= DBMS_SQL.EXECUTE('INSERT INTO table(NUMERICVALUE63)' ||
> VALUES(' || Result || ')';
> ...
>
> ....
>
>
> My problem is:
>
> When i call the stored procedure with SQLNavigator or SQL PLUS
> the command that is executed is:
>
> INSERT INTO table(NUMERICVALUE63) VALUES(33.333);
>
> and this for me is good...
>
> but when i call the stoder procedure via JDBC(thin driver) i obtain
>
> INSERT INTO table(NUMERICVALUE63) VALUES(33,333);
>
> which give me a too many values error from the DBServer
> (it uses the comma like separator, not like decimal character)
>
> What i have to configure/do to have the right effect?
>
> I live in Italy where we write 100% = 100,000% , not 100.000%
>
> My client computer is a Windows NT4.
>
> Thank to the helpers!
>
> Andrea B.
>
>

The decimal separator on the *server* either by means of (IIRC) NLS_DECIMAL_SEPARATOR or by the internation settings in control panel. Usually Oracle picks those latter settings when you don't do anything.

Hth,

Sybrand Bakker, Oracle DBA Received on Thu May 31 2001 - 13:43:43 CDT

Original text of this message

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