Unix Technical Forum

How to transfer varchar2 to long raw

This is a discussion on How to transfer varchar2 to long raw within the Oracle Miscellaneous forums, part of the Oracle Database category; --> > The real field name is YFBZYJ in table T1 and T2. > I use Oracle 9i. > > ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-08-2008, 11:15 AM
Brian Peasland
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

> The real field name is YFBZYJ in table T1 and T2.
> I use Oracle 9i.
>
> Some one design the database, the field YFBZYJ is
> used for client to fill opinion which maybe
> 100 characters, or maybe 5,000 characters long.
> So the designer change the origin field type
> from varchar2(4000) to Long Raw.


As I have stated, LONG RAW is for BINARY data and you have character
data. If you insist on storing character data in to a LONG RAW datatype,
then you will have to store the character data in some sort of file
(text file, MS Word doc, etc) and the insert that binary document into
the column. Talk about a long way to go when LONG RAW is not meant to
hold character data. And then you'd have to write a routine to pull
binary data out of the LONG RAW column and represent it in the web app.
It is much, much easier to use LONG or CLOB.

> Yes, Blob or Clob will be better.But web developers use
> a interface to operate database. This interface can only
> deal with long raw.


The interface "can only deal with long raw"?!?!?! That statement is
going to be incorrect 99.9% of the time. Every development platform that
I have worked with that supports LONG RAW also supports LONG. I am
leaving open the possibility that some crazy development platform does
not follow this, but I have yet to work with it. And I've worked with
quite a few web development platforms that interact with an Oracle
database....Java, ASP and ASP.NET, JSP, Cold Fusion, PHP, Perl/DBI, and
the list goes on and on.

And unless this app is written in some archaic/old web development
platform, it will also support BLOB and CLOB. In many cases, one doesn't
even know the difference between 3,000 characters stored in
VARCHAR2(4000) and CLOB. In many cases, the programming is the same.


HTH,
Brian




--
================================================== =================

Brian Peasland
dba@nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-08-2008, 11:16 AM
DA Morgan
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

tamsun wrote:

> Can you give me some suggestions about this scenario:
>
> user will input many characters, maybe 1,000,
> maybe 10,000. How to store these characters into database
> except using attachment ?


CLOB CLOB and CLOB. That is the best possible solution.

If the web developers can't figure out to to use it then that is the
problem you should be asking about. What toolset are they using?
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-08-2008, 11:16 AM
tamsun
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

On Thu, 31 Aug 2006 10:21:55 -0700, DA Morgan <damorgan@psoug.org>
wrote:

xcept using attachment ?
>
>CLOB CLOB and CLOB. That is the best possible solution.
>
>If the web developers can't figure out to to use it then that is the
>problem you should be asking about. What toolset are they using?


Thanks again.

Once I have create a table with a BLOB field to stored attachment.
The web program make wrong, when I change BLOB to long raw, it's
work. As for CLOB, I have not do experiment. I really don't know
why because the web platform is not open to me. When I consult
the engineer who make the platform, he ask me to use long raw.
I'm sorry for my low-grade question. I think I must misunderstand
something. Today I will ask the engineer again.

Thank you very much.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 04-08-2008, 11:16 AM
DA Morgan
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

tamsun wrote:
> On Thu, 31 Aug 2006 10:21:55 -0700, DA Morgan <damorgan@psoug.org>
> wrote:
>
> xcept using attachment ?
>> CLOB CLOB and CLOB. That is the best possible solution.
>>
>> If the web developers can't figure out to to use it then that is the
>> problem you should be asking about. What toolset are they using?

>
> Thanks again.
>
> Once I have create a table with a BLOB field to stored attachment.
> The web program make wrong, when I change BLOB to long raw, it's
> work. As for CLOB, I have not do experiment. I really don't know
> why because the web platform is not open to me. When I consult
> the engineer who make the platform, he ask me to use long raw.
> I'm sorry for my low-grade question. I think I must misunderstand
> something. Today I will ask the engineer again.
>
> Thank you very much.


I appreciate that English may not be your first language but it seems
that you are not understanding what multiple people have tried to tell
you.

VARCHAR2 and CLOB and LONG = characters
LONG RAW and BLOB = binary

They are not interchangeable.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 04-08-2008, 11:16 AM
tamsun
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

On Thu, 31 Aug 2006 20:33:09 -0700, DA Morgan <damorgan@psoug.org>
wrote:


>
>I appreciate that English may not be your first language but it seems
>that you are not understanding what multiple people have tried to tell
>you.
>
>VARCHAR2 and CLOB and LONG = characters
>LONG RAW and BLOB = binary
>
>They are not interchangeable.



I understand. thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com