Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Problems with a stored procedure , Oracle and JDBC
"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
![]() |
![]() |