Home » SQL & PL/SQL » SQL & PL/SQL » How to insert a blob object into a table - in sql
How to insert a blob object into a table - in sql [message #243355] Thu, 07 June 2007 01:16 Go to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Hi Guys,

Can anyone of you help me out in inserting a blob object into a table.

Thanks in Advance
Re: How to insert a blob object into a table - in sql [message #243360 is a reply to message #243355] Thu, 07 June 2007 01:26 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Have a look at the following topics:
how to insert a file in a column with blob datatype
blob for insert .doc/.pdf file into oracle column

Have a go at it and if you're still stuck, come back. But don't forget to mention:
1. database version
2. whether you want to upload client data/server files
3. your code (simplified if necessary, and within code tags)
4. error messages if applicable.

I suggest you read the first two topics (sticky) to get more tips. Good luck!

MHE
Re: How to insert a blob object into a table - in sql [message #243399 is a reply to message #243355] Thu, 07 June 2007 03:58 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Hi,

Thanks for responding!

I tries the code which u have given the link.
I created the Procedure successfully, but got the following errror when i tried to run

begin
exec load_image( 'blue_bullet.gif' );
end;

ERROR :

2288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at "APPS.LOAD_IMAGE", line 24
ORA-06512: at line 2


version is 9i
client server files
Re: How to insert a blob object into a table - in sql [message #243408 is a reply to message #243399] Thu, 07 June 2007 04:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
No such file or directory

It seems clear to me.

Regards
Michel
Re: How to insert a blob object into a table - in sql [message #243460 is a reply to message #243355] Thu, 07 June 2007 06:18 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Can you explain me more on this
Re: How to insert a blob object into a table - in sql [message #243472 is a reply to message #243460] Thu, 07 June 2007 07:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Sorry I can't say clearer than the message.
What part don't you understand?

Regards
Michel
Re: How to insert a blob object into a table - in sql [message #243688 is a reply to message #243355] Fri, 08 June 2007 07:45 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
how do you refer the path to the client machine...

Lets take like this:
1.I have a .gif FILE in my system("d:\folder1\test.gif") and need to insert into the database.
2.In which part of the code should I mention the path.

This is what i tried and got the following error.

Re: How to insert a blob object into a table - in sql [message #243690 is a reply to message #243688] Fri, 08 June 2007 07:51 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
how do you refer the path to the client machine

You can't. PL/SQL always runs on the server and only see server file. You can workaround this mounting the client file system on the server.
Quote:
In which part of the code should I mention the pat

In your "load_image" I think but I don't know it.

Regards
Michel


Previous Topic: Compute complex SQL query with decode
Next Topic: Create a folder from Procedure
Goto Forum:
  


Current Time: Sat Dec 03 01:18:43 CST 2016

Total time taken to generate the page: 0.08424 seconds