Connecting Tech Pros Worldwide Forums | Help | Site Map

Is it possible to split the content of Blob Datafield?

Member
 
Join Date: Nov 2008
Posts: 35
#1: Nov 14 '08
Hi.

Is it Possible to separate contents present in Blob Datafiled?

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Nov 14 '08

re: Is it possible to split the content of Blob Datafield?


Not using MySQL. Why would you want to do that?
Member
 
Join Date: Nov 2008
Posts: 35
#3: Nov 18 '08

re: Is it possible to split the content of Blob Datafield?


Thanks for reply.
Actually i have stored long text in my blob field,and that long text contains line n\by line inputs like below ,

name: xx
No:yy
subject:xyz
Class:abc
Marks: 123

so when i am retrieving these values to Browser in Jsp contents can present in the blob filed displayed like this. name:xxno:yysubject:xyzclass:abcmarks:123.

this is what the problem i am facing right now.

so i want to display the contents of blob field as it stored in the table .

Any idea about this problem..
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: Nov 18 '08

re: Is it possible to split the content of Blob Datafield?


1.) Your structure doesn't look right. You are storing many things in one column instead of splitting all that into separate columns. Read about normalization.
2.) Long text should be stored in a CLOB rather than a BLOB field.
3.) You need to replace all the \n with <br /> for that to display correctly. Just use String's replaceAll method for that.
Reply