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 -> SQL Exception: Bigger type length than Maximum

SQL Exception: Bigger type length than Maximum

From: Amit Pradhan <amitp_at_ix.netcom.com>
Date: Wed, 21 Jul 1999 20:50:51 -0700
Message-ID: <3796951B.D609D881@ix.netcom.com>


Solaris 2.5, Oracle 7.x, Oracle JDBC Thin (Type 4), Netscape 3.5.1 web server (non-issue)
Java servlet (JRunPro 2.2.x) (non-issue)

I'm running a single query in the servlet that looks something like:

"select c1,c2,...,c22

from t1,t2,t3,t4
where <a bunch of joins using t1,t2,t3,t4)   and t1.c1 like 'a%'

I use the OracleStatement class to define types of the columns (they are all VARCHAR2(255)) upfront, to avoid 2 roundtrips to the database.

Query runs fine & ResultSet object has a complete set of results only if the number of rows is less than 180. I keep a count of the number of rows (rows are appended into a string buffer) & diplay the count value in the catch block.

If the number of rows exceeds 180, (ie. if I change the where clause & use " t1.c1 like 'b%' " which has about 363 rows) the SQL Exception message shows up:

"Bigger type length than Maximum"

Vendor code in the exception is 0.

The query works fine in SQL Plus & shows that for
" t1.c1 like 'a%' " number of rows is 43 - works
" t1.c1 like 'b%' " number of rows is 363 - NO work
" t1.c1 like 'bxy%' " number of rows is 150 - works

The documentation (or lack thereof) on Oracle's Jdbc classes is pathetically poor. They do'nt even provide source for their classes in the classes111.zip file that I am using .

What does that exception mean ? How do I get around it (without displaying results in batches via stored proc. etc.) ? Can I somehow reset the "Maximum" value somewhere ?

Any suggestions/help will be appreciated. amit


Received on Wed Jul 21 1999 - 22:50:51 CDT

Original text of this message

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