Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA-01722 Invalid Number

77 views
Skip to first unread message

Fernando Nobre

unread,
Nov 19, 2002, 5:52:08 AM11/19/02
to
Dear,


I´m using Oracle 9i r2, Delphi 6.0 SP2, com TSQLConnection and raise a
ORA-01722 error when I try post a record with Integer Field.

Thankx


Fernando Nobre


hlas

unread,
Nov 19, 2002, 3:02:16 PM11/19/02
to
try to execute this sql
alter session set nls_numeric_character = '.,'
in beforeshow in main form or so...


Peter


"Fernando Nobre" <no...@softone.com.br> píąe v diskusním příspěvku
news:3dda...@newsgroups.borland.com...

Fernando Nobre

unread,
Nov 19, 2002, 9:04:59 PM11/19/02
to
I´ve tried execute the SQL but raise other error:

ORA-00922 : missing option or invalid.

Fernando


"hlas" <hl...@inmail.sk> escreveu na mensagem
news:3dda...@newsgroups.borland.com...

Dettmer, A. L.

unread,
Nov 20, 2002, 2:50:26 PM11/20/02
to

Fernando Nobre wrote:
> I´ve tried execute the SQL but raise other error:
>
> ORA-00922 : missing option or invalid.
>

I think that it can be one from: a) D6 oracle driver isn't
certified to oracle 9i (quite possible) or b) you have some
kind of internationalization problem. Take a look in the
dbExpress NG and you will see that ORA 01722 is a frequent subject.

John Pierce

unread,
Nov 21, 2002, 1:23:50 PM11/21/02
to
NLS_NUMERIC_CHARACTERS note the 'S'

JP

Fernando Nobre

unread,
Nov 21, 2002, 8:21:53 PM11/21/02
to
John,

I've note that was missing S, it愀 work!!

Thanks,

Fernando


"John Pierce" <jpi...@healthplanning.com> escreveu na mensagem
news:3DDD24B6...@healthplanning.com...
> NLS_NUMERIC_CHARACTERS note the 'S'
>
> JP
>


spamnothing

unread,
Nov 21, 2002, 10:10:10 PM11/21/02
to
Hi All,

/BIG RANT/
I've mentioned in another post to the same question, you really
shouldn't play with the NLS settings unless there is a _real_ serious
reason to do so. Delphi natively supports correct locale conventions
when you correctly use them.

If the DB driver you're using has no concept of locale/server settings
then clearly you'll have to mess with the settings. If it's some other
problem then all you are doing is compounding the problem further.

If you've decided that you really must change NLS settings then
NLS_NUMERIC_CHARACTERS probably isn't the way do it. As I've mentioned
before if you set the territory, lots of other stuff follows (on the
instance - ie init.ora). If you set just the numeric characters you
could have a database running American date settings on a Chinese
character set with a Euro currency symbol with french numeric
separators. Post that as a question to b.p.d.s or even on a dedicated
Oracle group for a laugh.

I won't sit here and pretend I've never done it, I truly don't believe
the crap I've written to shaft Oracle's server and client settings to
make it run someone else's application on someone elses server - but
that's the point - if you don't play with or assume the NLS settings
none of that crap would have been necessary.

I'm starting to think there might be a problem with the dbExpress
drtiver, and *if* someone shows that is the case then I might even
publish the code to completely trash Oracle's idea of locale. I've never
tried to access Oracle via dbExpress so I don't know whether or not it's
a dbExpress problem. I'm guessing that means you don't either, and that
means you're just playing with fire.

If you must set the NLS, set the territory as a group of settings - and
if you can, set it on the instance, not the session. If your DBA says
setting it on the instance would screw the database, then think about it
- you can safely assume that someone else has made the same poor
assumptions and hard coded date/time/currency/etc formats. Doesn't that
really annoy you? You doing an alter session might just make the DBA
even happier.

Once more for clarity - my Delphi apps work on any Client machine, any
locale, on any Oracle, in any country (ok, I submit to r to l
languages). I'm not doing anything clever - just doing what the book
says. Again, I don't use dbExpress but if it is a dbExpress problem I'd
like to know.

Someone please enlighten us all before every dbExpress programmer in the
world starts issuing a f***ing 'alter session' statement every time they
connect. That way I can build some 'on connect' triggers to stop them
connecting to any of my databases.
/RANT/

:-) phew, feel better already

Regards
Bill

(someone mentioned that dbExpress falles over on anything other than
NLS_TERRITORY = 'AMERICAN')

In message <3ddd...@newsgroups.borland.com>, Fernando Nobre
<no...@softone.com.br> writes

--
Bill

Dettmer, A. L.

unread,
Nov 28, 2002, 4:20:08 AM11/28/02
to
I would like to make your words mine.

Dettmer, A. L.

unread,
Nov 29, 2002, 8:46:05 AM11/29/02
to
Any way there's still a problem...

Eduardo Matias

unread,
Dec 16, 2002, 9:03:01 AM12/16/02
to
Armando, I think that you've got blank spaces in your variable, try use Trim
Command like this : To_Number( Trim( XXX ) )

"Dettmer, A. L." <arm...@eps.ufsc.br> escreveu na mensagem
news:3DE76F9D...@eps.ufsc.br...

0 new messages