ORA-12899: value too large for column won ?t be passed to application

forum.gupta.bugreport (2005-2010)
Max Purner

ORA-12899: value too large for column won ?t be passed to application

Post by Max Purner » 13 Sep 2005, 16:53

 Posted by:  max.purner@ages.at 

Configuration:

Oracle 10g (10.1.0)
Sql Windows Version 3.1.0
(Also the oracle client used is 10.1.0)

In the Oracle database, we have a table where a certain column is of type
varchar2 length 20. In the application, the corresponding data field is of
length 80. If the User enters more than 20 characters and then tries to
perform an update, no SQL Error is passed to the application. If the SQL
statement is executed from SqlTalk, also no Sql Error comes up, only the
message ?0 rows updated? is shown.

SqlPlus from Oracle, however, correctly responds with the error message:
ORA-12899: value too large for column ?if the statement is sent via
sqlPlus.

Is there any way that the application gets the On SAM_SqlError in that
case?

Thank you,

Max Purner

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: ORA-12899: value too large for column won ?t be passed to application

Post by Jeff Luther » 13 Sep 2005, 17:44

 Posted by:  Jeff Luther 

I'm surprised!, like you must be. Sounds like a nasty router problem which
might be ignoring other Oracle errors as well.

If so, a workaround might be--for your example--to use the Oracle view
"col" to get backend info. about column types and lengths, so your code
can keep data entry 'legal.' (Your code could call SalSetMaxDataLength()
to set field lengths at run-time, trap SAM_Validate with max. length
info. and return VALIDATE_Cancel if the value is too long, etc.)

Here's an example of getting db column lengths run from iSQL*Plus:

select CNAME, COLTYPE, WIDTH from COL where tname = 'ZIP_CODES';
CNAME COLTYPE WIDTH
----- ------- -----
PK_ZIP_CODES VARCHAR2 10
CITY VARCHAR2 100
STATE VARCHAR2 4

Best Regards,
Jeff Luther/PC Design
www.pulpcards.com/gupta/

Max Purner

Re: ORA-12899: value too large for column won ?t be passed to application

Post by Max Purner » 14 Sep 2005, 12:02

 Posted by:  max.purner@ages.at 

Thank you.

Of course I changed the length of the datafield in the application to 20
now, but who knows where that problem might come up again.

As a quick workaround implemented that SqlGetModifiedRows is queried after
every insert / update. If that returns 0, the user is informed that the
insert / update was not successful.

PS: Sorry for the question marks that popped up here and there in my first
posting. I didn't type them in, that Lotus Notes here also has some kind
of router problem.

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests