473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Using CachedRowSet Selecting a BLOB Column

Hi there...

I have a stateless Session Bean issuing a select for a BLOB column. This
bean is using a CachedRowSet. It seems to work for all other columns types
other than a BLOB. Selecting a BLOB column, a SQLExcpetion when the
CachedRowSet is populated. Anyone else run in to this situation?

ENV:
WSAD 5.0.1 running on WIN2K or RH9 (WAS 5 Datasouce)
DB2 UDB 8.1 FP 3 (client)
DB2 OS390 7.2 (server)

The Application SQL Trace:
[11/25/03 18:43:25.025 CST][Servlet.Engine.Transports : 0]:DEBUG
EXAV.DataAccessManager - SQL Stmt:SELECT PROBLEM_ATTACHMENT.PROBLEM_ATT_ID,
PROBLEM_ATTACHMENT.FIELD_NAME, PROBLEM_ATTACHMENT.FILE_NAME,
PROBLEM_ATTACHMENT.FILE_SIZE, PROBLEM_ATTACHMENT.PROBLEM_ID,
PROBLEM_ATTACHMENT.TABLE_NAME, PROBLEM_ATTACHMENT.ATTACHMENT FROM
TSD630UC.PROBLEM_ATTACHMENT PROBLEM_ATTACHMENT WHERE ( (
PROBLEM_ATTACHMENT.PROBLEM_ID = ? ) ) FETCH FIRST 2 ROWS ONLY
[11/25/03 18:43:25.025 CST][Servlet.Engine.Transports : 0]:DEBUG
EXAV.DataAccessManager - setParameters(List parameters, PreparedStatement
iPS):Param Type: CHAR Value:SITEA-00007413

[11/25/03 18:43:38.038 CST][Servlet.Engine.Transports : 0]:DEBUG
EXAV.DataAccessManager - DB Statement Execution time = 19984 msec

The Code snipit:
locRS = locPS.executeQuery();

locCRSet = new CachedRowSet();

locCRSet.populate(locRS); <---Error thrown from here
The Error (from the CLI trace):

SQLGetDiagFieldW( pDiagInfo=0, pcbDiagInfo=0 )
<--- SQL_SUCCESS Time elapsed - +5.425300E-002 seconds

SQLErrorW( hEnv=0:0, hDbc=0:0, hStmt=2:2, pszSqlState=&19eee334,
pfNativeError=&19eee330, pszErrorMsg=&19eedb2c, cbErrorMsgMax=1024,
pcbErrorMsg=&19eedb28 )
---> Time elapsed - +4.453000E-003 seconds
( iRowNumber=1, iColumnNumber=-2 )

SQLErrorW( pszSqlState="22011" - X"32003200300031003100",
pfNativeError=-138, pszErrorMsg="[IBM][CLI Driver][DB2] SQL0138N The second
or third argument of the SUBSTR function is out of range. SQLSTATE=22011

" -
X"5B00490042004D005D005B0043004C004900200044007200 69007600650072005D005B0044
00420032005D002000530051004C0030003100330038004E00 20002000540068006500200073
00650063006F006E00640020006F0072002000740068006900 72006400200061007200670075
006D0065006E00740020006F00660020007400680065002000 53005500420053005400520020
00660075006E006300740069006F006E002000690073002000 6F007500740020006F00660020
00720061006E00670065002E0020002000530051004C005300 54004100540045003D00320032
003000310031000D000A00", pcbErrorMsg=119 )

Nov 12 '05 #1
0 2403

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

Similar topics

0
by: Jeremy | last post by:
Hi, can anybody tell me where/how to get Sun's implementation of CachedRowSet?? I've found (old-ish) articles saying it's available as rowset.jar from the Early Access part of the developer...
3
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around...
3
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? ...
2
by: deepgun74 | last post by:
I have a blob column that is 4MB in length. I need to change it to store a 3GIG binary. 1) What is the maximum size a BLOB column can support? 2) How do i alter the size of an existing BLOB...
1
by: Cerebrus | last post by:
Hi all, Using : .NET 1.1, SQL Server 2000, Win 2K. Could anyone confirm if there is a bug in the SqlDataReader.GetChars() method when using CommandBehavior.SequentialAccess to get a BLOB...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
1
by: shallowpool | last post by:
Can someone provide me the simple syntax necessary to insert or update to a row containing a single BLOB column, where the BLOB data will be obtained from a file? This is on a linux installation. ...
5
by: prasath03 | last post by:
Hi All, I tried CachedRowSet and it is working in my java class. crs.setCommand("SELECT * from test"); System.out.println("Connection establishing ......"); crs.execute();...
1
by: prasath03 | last post by:
I'm new to JSP, and am trying this sample code for instantiating a bean for use in a disconnected ResultSet, i placed the rowset.jar under WEB-INF/lib directory but i get the following error: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...

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.