If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > inserting clobs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-04, 01:07
jmazz jmazz is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
inserting clobs

I was tring to insert a clob object into DB2 v 7.2 from my web site by executing a INSERT statement and running into a problem when I execute.

It appears that the my SQL statment is getting Truncated, or is reaching some size limit...

How could I check this? or is there a better way of insterting CLOB into a remote db?

Thanks Inadvance
Reply With Quote
  #2 (permalink)  
Old 07-23-04, 09:41
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
There's a limit of 32K bytes on the length of string literals - may be this is your problem. You can try to work around this limitation by concatenating together several literal strings, each of them being shorter than 32K. However, you'll hit the 64K limit on the length of a SQL statement.

A proper way to work with LOBs depends on the programming language you use. In java, you would use PreparedStatement.setCharacterStream()
Reply With Quote
  #3 (permalink)  
Old 07-23-04, 11:01
jmazz jmazz is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
I am current using Microsofts ADO object. Would anybody have some sample code that does this java evquivalent?
Reply With Quote
  #4 (permalink)  
Old 07-23-04, 12:10
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On