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. > > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > 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 |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |
| ||||
| 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. |