View Single Post

   
  #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
Reply With Quote