dbTalk Databases Forums  

java.sql.SQLException: Data size bigger than max size for this type:3991

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss java.sql.SQLException: Data size bigger than max size for this type:3991 in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
uday
 
Posts: n/a

Default java.sql.SQLException: Data size bigger than max size for this type:3991 - 07-24-2008 , 04:30 AM






Hi,
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

thanks in advance.

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this type: 3991 - 07-25-2008 , 01:49 AM






uday <uday1067 (AT) gmail (DOT) com> wrote:
Quote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution
Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this type: 3991 - 07-25-2008 , 01:49 AM



uday <uday1067 (AT) gmail (DOT) com> wrote:
Quote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution
Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this type: 3991 - 07-25-2008 , 01:49 AM



uday <uday1067 (AT) gmail (DOT) com> wrote:
Quote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution
Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this type: 3991 - 07-25-2008 , 01:49 AM



uday <uday1067 (AT) gmail (DOT) com> wrote:
Quote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution
Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
uday
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this - 07-25-2008 , 07:43 AM



On Jul 25, 11:49*am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
uday <uday1... (AT) gmail (DOT) com> wrote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe
CREATE TABLE ct_tb_crs_ovrvw
(
nm_prgrm_id NUMBER,
vc_prgrm_ovrvw VARCHAR2(4000),
vc_prgrm_otcm VARCHAR2(4000),
vc_trgt_odnc VARCHAR2(4000),
vc_lang VARCHAR2(100),
ch_sft_dlt char,
vc_crtd_by VARCHAR2(100),
dt_crtd_dt DATE,
vc_mntn_by VARCHAR2(100),
dt_mntn_dt DATE
);
and i m tryying to put the values in vc_prgrm_ovrvw field.
db charector set is UTF-8

please suggest some solution.
thanks
uday


Reply With Quote
  #7  
Old   
uday
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this - 07-25-2008 , 07:43 AM



On Jul 25, 11:49*am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
uday <uday1... (AT) gmail (DOT) com> wrote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe
CREATE TABLE ct_tb_crs_ovrvw
(
nm_prgrm_id NUMBER,
vc_prgrm_ovrvw VARCHAR2(4000),
vc_prgrm_otcm VARCHAR2(4000),
vc_trgt_odnc VARCHAR2(4000),
vc_lang VARCHAR2(100),
ch_sft_dlt char,
vc_crtd_by VARCHAR2(100),
dt_crtd_dt DATE,
vc_mntn_by VARCHAR2(100),
dt_mntn_dt DATE
);
and i m tryying to put the values in vc_prgrm_ovrvw field.
db charector set is UTF-8

please suggest some solution.
thanks
uday


Reply With Quote
  #8  
Old   
uday
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this - 07-25-2008 , 07:43 AM



On Jul 25, 11:49*am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
uday <uday1... (AT) gmail (DOT) com> wrote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe
CREATE TABLE ct_tb_crs_ovrvw
(
nm_prgrm_id NUMBER,
vc_prgrm_ovrvw VARCHAR2(4000),
vc_prgrm_otcm VARCHAR2(4000),
vc_trgt_odnc VARCHAR2(4000),
vc_lang VARCHAR2(100),
ch_sft_dlt char,
vc_crtd_by VARCHAR2(100),
dt_crtd_dt DATE,
vc_mntn_by VARCHAR2(100),
dt_mntn_dt DATE
);
and i m tryying to put the values in vc_prgrm_ovrvw field.
db charector set is UTF-8

please suggest some solution.
thanks
uday


Reply With Quote
  #9  
Old   
uday
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this - 07-25-2008 , 07:43 AM



On Jul 25, 11:49*am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
uday <uday1... (AT) gmail (DOT) com> wrote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

Well, how is the field defined? What is the value you want to store?
What is the database character set?

Yours,
Laurenz Albe
CREATE TABLE ct_tb_crs_ovrvw
(
nm_prgrm_id NUMBER,
vc_prgrm_ovrvw VARCHAR2(4000),
vc_prgrm_otcm VARCHAR2(4000),
vc_trgt_odnc VARCHAR2(4000),
vc_lang VARCHAR2(100),
ch_sft_dlt char,
vc_crtd_by VARCHAR2(100),
dt_crtd_dt DATE,
vc_mntn_by VARCHAR2(100),
dt_mntn_dt DATE
);
and i m tryying to put the values in vc_prgrm_ovrvw field.
db charector set is UTF-8

please suggest some solution.
thanks
uday


Reply With Quote
  #10  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: java.sql.SQLException: Data size bigger than max size for this type: 3991 - 07-25-2008 , 09:13 AM



uday <uday1067 (AT) gmail (DOT) com> wrote:
Quote:
i have been using setString() of prepared statement. but it is giving
me
java.sql.SQLException: Data size bigger than max size for this type:
3991 exception. where as as per my understanding, the size of varchar2
is 4000.

can someone suggest the solution

Well, how is the field defined? What is the value you want to store?
What is the database character set?

CREATE TABLE ct_tb_crs_ovrvw
(
nm_prgrm_id NUMBER,
vc_prgrm_ovrvw VARCHAR2(4000),
vc_prgrm_otcm VARCHAR2(4000),
vc_trgt_odnc VARCHAR2(4000),
vc_lang VARCHAR2(100),
ch_sft_dlt char,
vc_crtd_by VARCHAR2(100),
dt_crtd_dt DATE,
vc_mntn_by VARCHAR2(100),
dt_mntn_dt DATE
);
and i m tryying to put the values in vc_prgrm_ovrvw field.
db charector set is UTF-8
See Metalink note 144808.1

4000 is the hard limit in the number of *bytes* that can be stored in
any VARCHAR2 field.

In UTF-8, a character can take more than one byte.

Even if you had defined the field as VARCHAR2(4000 CHAR) as generally is
advisable in an UTF-8 database, you're still stuck with a physical limit
of 4000 bytes per VARCHAR2 field.

If the string you are trying to store is not more than 4000 characters
long, it must contain some characters that take up more than one byte
to trigger the message.

Quote:
please suggest some solution.
Use CLOB. Or a different DBMS.

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.