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

Home -> Community -> Usenet -> c.d.o.misc -> Re: varchar2 length and writing too much

Re: varchar2 length and writing too much

From: JEFFKISH <ait_at_concentric.net>
Date: Fri, 29 Jan 1999 19:59:48 GMT
Message-ID: <36b312bd.19266473@news.iserv.net>


A partial answer to my own question. This was due, after querying Oracle support, to a but in jdbc included with Oracle 7.3 which had problems with columns greater than 256 in multi character set databases.

I didn't think my database was multi-character, but the problem ended up going away after a made sure there was less than 256 characters in the column.

The recommended solution was to go with the jdbc driver you can download from Oracle that goes with Oracle 8.x

cheers,

Jeff Kish
jeff.kish_at_ait-mmii.com

On Tue, 12 Jan 1999 17:37:54 GMT, ait_at_concentric.net (JEFFKISH) wrote:

>Simple question here, I think.
>
>Oracle 7.3
>
>I created a table with columns of varchar2, one which is defined as
>varchar2(256).
>
>Recently when I accessed the table using jdbc I got an error: "BIGGER
>TYPE LENGTH THAN MAXIMUM".
>
>When I persued this I found that there were actually 258 characters of
>description in the column for the row read. I perused this using both
>Oracle SQL 3.3 and Microsoft Explorer.
>
>I was able to both fix this and "unfix" this by writing new data using
>Microsoft query.
>
>I am assuming that MS Query is using ODBC. So here are the facts as I
>see them:
>
>1) Oracle SQL 3.3 lets you read data longer than the column defined.
>2) MS Query lets you read and write too much data (no error is
>generated).
>3) JDBC drivers generate an error if they read such a column (more
>data than the column length is defined for).
>
>Can someone tell me
>1) why Oracle is letting you do this without throwing some type of
>error
>2) I am assuming Oracle SQL 3.3 would have let me write too much data
>also.
>3) Is the best way to protect against this is at the application
>level?
>
>any comments and responses are appreciated.
>
>Thanks
>Jeff
Received on Fri Jan 29 1999 - 13:59:48 CST

Original text of this message

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