Unix Technical Forum

How to insert a file in a CLOB field.

This is a discussion on How to insert a file in a CLOB field. within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi, I have to migrate a mysql table in a oracle table with the same structure (with the opportune ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 11:16 AM
Balabiot
 
Posts: n/a
Default How to insert a file in a CLOB field.

Hi,

I have to migrate a mysql table in a oracle table with the same
structure (with the opportune conversions of the datatypes).

Unfortunatly, a field in the source database is a longtext, that in
oracle is a CLOB. I try to copy all field the data with java, .net and
vb6 without success.

So I have to take the decision of migrate only the field with simple
datatype (varchar2, number and date), and with a vb6 program, download
on my pc mysql longtext, and this operation is ok.

with an another .net program I'm successful to import file with size
not more than 3 or 4K, but I have to import file with size of 2M, but
in this case (and when the size is 6K) I have the follow error :
Can bind a LONG value only for insert into a LONG column

I have read that in a CLOB I can insert 4GB.

Someone can help me?

Thank you so much.
Ciao
Balabiot



I have to insert a file (.jpg, .xls and .gif) in a CLOB field.

With .net I can

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 11:16 AM
DA Morgan
 
Posts: n/a
Default Re: How to insert a file in a CLOB field.

Balabiot wrote:
> Hi,
>
> I have to migrate a mysql table in a oracle table with the same
> structure (with the opportune conversions of the datatypes).
>
> Unfortunatly, a field in the source database is a longtext, that in
> oracle is a CLOB. I try to copy all field the data with java, .net and
> vb6 without success.
>
> So I have to take the decision of migrate only the field with simple
> datatype (varchar2, number and date), and with a vb6 program, download
> on my pc mysql longtext, and this operation is ok.
>
> with an another .net program I'm successful to import file with size
> not more than 3 or 4K, but I have to import file with size of 2M, but
> in this case (and when the size is 6K) I have the follow error :
> Can bind a LONG value only for insert into a LONG column
>
> I have read that in a CLOB I can insert 4GB.
>
> Someone can help me?
>
> Thank you so much.
> Ciao
> Balabiot
>
>
>
> I have to insert a file (.jpg, .xls and .gif) in a CLOB field.
>
> With .net I can


You don't explain why you are having problems moving the CLOB data.
If you did someone might be able to help you.

To load either look at the following built-in packages.
UTL_FILE
DBMS_LOB
INTERMEDIA

All with demos at www.psoug.org in Morgan's Library.
--
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
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:21 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