473,785 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JDBC,CLI0109E,V ARCHAR(2000) to VARCHAR(4000)

I'm driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I'm using Weblogic DB2's Type 2 driver, which has been very
reliable - so far.

I have a PreparedStateme nt that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdb c.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001

I haven't a clue as to the source of the problem and that's
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParamete r, but that doesn't sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.

Nov 12 '05 #1
18 5986


gi************* ******@yahoo.co m wrote:
I'm driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I'm using Weblogic DB2's Type 2 driver, which has been very
reliable - so far.

I have a PreparedStateme nt that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdb c.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001
Hi. I'll be glad to help you, but the exception you show
seems to be from an IBM driver, not the one that comes
with WebLogic. We provide a type-4 (all Java) driver.
Does the same problem occur if you restart weblogic
after the table has changed?
Joe Weinstein at BEA

I haven't a clue as to the source of the problem and that's
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParamete r, but that doesn't sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.


Nov 12 '05 #2
I recently had a problem creating a varchar(4000) column using DB2's CLP.
(I later found that I could only create it if that was the only column in
the table.) I changed my app to LONG VARCHAR and it worked.

--
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"
<gi************ *******@yahoo.c om> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I'm driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I'm using Weblogic DB2's Type 2 driver, which has been very
reliable - so far.

I have a PreparedStateme nt that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdb c.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001

I haven't a clue as to the source of the problem and that's
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParamete r, but that doesn't sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.

Nov 12 '05 #3
"Larry Menard" <ro**@GoSpamYou rself.com> wrote in message
news:q9******** ************@ro gers.com...
I recently had a problem creating a varchar(4000) column using DB2's
CLP. (I later found that I could only create it if that was the only
column in the table.) I changed my app to LONG VARCHAR and it worked.

--
--------------------
Larry Menard


What was the page size of the tablespace?
Nov 12 '05 #4
<gi************ *******@yahoo.c om> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I'm driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I'm using Weblogic DB2's Type 2 driver, which has been very
reliable - so far.

I have a PreparedStateme nt that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdb c.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001

I haven't a clue as to the source of the problem and that's
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParamete r, but that doesn't sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.


What is the page size of your tablespace?
Nov 12 '05 #5
gi************* ******@yahoo.co m wrote:
I'm driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.


Which fixlevel is 8.1.4? There were several fixes for unexpected
CLI1019E errors during FP5 to FP10.

IY49990 could be a candidate for your problem

http://www-1.ibm.com/support/docview...cc=us&lang=all

--
"Ja, alles meine Herren" sprach Fürst Lichnowsky. "Ooch det roochen?"
"Ja, auch das Rauchen." "Ooch im Tiergarten?" "Ja, auch im Tiergarten
darf geraucht werden, meine Herren." Und so endeten die Barrikadenkämpf e
des 18. März in Berlin
Nov 12 '05 #6
It was 4K.

--
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"
"Mark A" <no****@nowhere .com> wrote in message
news:Ju******** *************** *******@comcast .com...
"Larry Menard" <ro**@GoSpamYou rself.com> wrote in message
news:q9******** ************@ro gers.com...
I recently had a problem creating a varchar(4000) column using DB2's
CLP. (I later found that I could only create it if that was the only
column in the table.) I changed my app to LONG VARCHAR and it worked.

--
--------------------
Larry Menard


What was the page size of the tablespace?

Nov 12 '05 #7
Thanks for the tips everyone.

Strange. I have a javascript alert that tells me that the length of the
string coming from the textbox is 3999. But somehow, by the time
the data attempts to get saved the length of the String is 4157.

I did try out the WebLogic Type 4 driver for DB2. The message was :

[BEA][DB2 JDBC Driver][DB2]Character data, right tuncation occured; for
example, an update or insert value is a string that is too long forthe
column, or a datetimevalue cannot be assigned to a host variable,
because it is too small.

It looks like validating the length of the data on the server side
will solve my problems.

....

BTW, Attempting to save with 27000 characters and the Type 2 driver
killed
the server and crashed the JVM.
From hs_err_pid2224. log :


An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : EXCEPTION_GUARD _PAGE (0x80000001) occurred at
PC=0x6C121EDB
Function=SQLPro cedureColumns+0 x54993
Library=C:\PROG RA~1\IBM\SQLLIB \BIN\DB2CLI.dll

Current Java thread:
at COM.ibm.db2.jdb c.app.DB2Prepar edStatement.SQL Execute(Native Method)
at COM.ibm.db2.jdb c.app.DB2Prepar edStatement.exe cute2(Unknown Source)

Nov 12 '05 #8
gi************* ******@yahoo.co m wrote:
Strange. I have a javascript alert that tells me that the length of the
string coming from the textbox is 3999. But somehow, by the time
the data attempts to get saved the length of the String is 4157.


Sounds like a strange problem in the areas "codepage conversion" and
"unicode".

Usually a VARCHAR stores 16bit unicode data (16bit per char) but you can
create the column as UTF-8 field to save space. In this case every char
between 0x01 and 0x7F is stored as 8bit, anything else is stored as
2x8bit or 3x8bit.

Bernd

--
"Ja, alles meine Herren" sprach Fürst Lichnowsky. "Ooch det roochen?"
"Ja, auch das Rauchen." "Ooch im Tiergarten?" "Ja, auch im Tiergarten
darf geraucht werden, meine Herren." Und so endeten die Barrikadenkämpf e
des 18. März in Berlin
Nov 12 '05 #9
This was the definition of the HTML control :

<textarea name="Experienc e" cols="50" rows="5" wrap="hard">
</textarea>

Perhaps some characters get added because of the wrap.

Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9071
by: Vani Kancherlapalli | last post by:
Hi The maximum length of a nvarchar could be 4000 characters while that of varchar could be 8000. We are trying to use unicode which would require that the datatype for one our fields be converted from varchar to nvarchar. But looks like this would result in loss of existing data. Is there a way to do this without loss of data?
3
3289
by: Dan Williams | last post by:
I'm trying to do a simple alteration to the table design of one of our SQL 2k tables, simply changing an identity row so that its not 'not for replication', and its taking absolutely ages to do so, and stops the sql server from working. Whilst it's attempting the update, no one can access the database, the sqlservr.exe memory usage shoots up and enterprise manager reports a not responding status. Eventually after about 10 minutes, it...
1
1534
by: herman | last post by:
Hello, I am experiencing some performance issues with the dbo.sysindexkeys. I wonder if anyone can help me create an index on it? Thanx! SQL script:
10
4667
by: Mahesh | last post by:
Hi, I am writing a SP in MSSQL. One of the parameted is VARCHAR type which have comma seperated INT vlaues. I want to use this varible in WHERE clause against INT type coloum. how do I achive this. eg. DECLARE @CompanyTypeIDs VARCHAR(200) SET @CompanyTypeIDs = '1,3,2' Currently I am using it as SELECT CompanyTypeID FROM Company WHERE CompanyTypeID IN (1,2,3)
1
1299
by: gimme_this_gimme_that | last post by:
after altering a table to use varchar(4000) instead of varchar(2000) is a DB2 database restart required? Thanks.
7
19781
by: Tzanko | last post by:
As we all know, there is a 8060 bytes size limit on SQL Server rows. I have a table which requires a number of text fields (5 or 6). Each of these text fields should support a max of 4000 characters. We currently store the data in varchar columns, which worked fine untill our appetite for text fields increased to the current requirement of 5, 6 fields of 4000 characters size. I am given to review a design, which esentially suggests moving...
1
2575
by: Chris Moore | last post by:
Hello, I am attempting to write a stored procedure that builds and executes a dynamic SQL statement which can be up to 8000 characters long. Therefore, I have declared a variable of type varchar(8000) which, according to the documentation, is the maximum acceptable length of such a variable. Unfortunately, however, SQL Server seems allow varchars to only be half this size: the resulting string keepings getting truncated to 4000...
3
4303
by: Okonita | last post by:
Hi everyone, I have been building a set of tables for a new database and having problem with tables having columns defined as Long Varchar. Can someone look this over and tell me what I am doing wrong with the create statement shown below: Error Msg: DB21034E The command was processed as an SQL statement because it was
0
1375
by: guest1 | last post by:
seems to be a problem in my first case stmt here i need to convert this and i dont know how, hope somebody can help me out select distinct top 10 tplan.plan_long_nm, asset.ast_cntr_pol_num, 'As of Date' = convert(varchar(12),val.pcov_vlu_asof_dt,101), 'Cash Surrender Value' = val.pcov_cash_sur_amt, 'MVA Index Value / Account Value' = case when grp.prem_pmt_typ_cd in ('FPDA', 'NA') then 'needs mapping' else null end,--These values...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.