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 > Data Access, Manipulation & Batch Languages > JAVA > Text column; funny behaviour

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-10, 21:54
amitmalhotra amitmalhotra is offline
Registered User
 
Join Date: Sep 2010
Posts: 3
Text column; funny behaviour

Kind of funny but looking at the possible cause to this problem that I've got a text type column called MessageText of MailMessages table.

Now whenever I am trying to read this through Java, it is throwing this exception:

Java Exception error '80004005'

ACD_Exception: No data found


Note here that this is not the Java problem because I've been using this program for last 10 years and this problem is only occuring with one record where the messageText size is 15360

" select Len(Cast (MessageText as varchar(max))) from MailMessages_Sick "

However, as soon as I do this, the program runs smooth:

Update MailMessages_Sick set MessageText = substring(MessageText, 0, 100000000 )

I am running the following MSSQL version:

Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) Nov 24 2008 13:01:59 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

[select @@version]
Reply With Quote
  #2 (permalink)  
Old 09-07-10, 09:01
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Curious. What happens when you execute your select statement directly on the database server, rather than through Java?
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #3 (permalink)  
Old 09-07-10, 19:13
amitmalhotra amitmalhotra is offline
Registered User
 
Join Date: Sep 2010
Posts: 3
No exceptions; it works like a charm.

Now don't direct me it should be JdBC but why only to this record, why why why

Reply With Quote
  #4 (permalink)  
Old 09-08-10, 08:44
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Dunno dunno dunno why why why.
But I'll move this thread to the Java forum, and maybe somebody there can give you some direction.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #5 (permalink)  
Old 09-08-10, 20:24
amitmalhotra amitmalhotra is offline
Registered User
 
Join Date: Sep 2010
Posts: 3
Thanks Mate!
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On