Home » SQL & PL/SQL » SQL & PL/SQL » Error in inserting image in BLOB column
Error in inserting image in BLOB column [message #270889] Fri, 28 September 2007 04:54 Go to next message
aslamsadia
Messages: 19
Registered: December 2006
Junior Member
While I am inserting into the table VOTERID which has one column of BLOB datatype is generating error. My command is :-
INSERT INTO VOTERID(ID,NAME,ADDR,PHOTO) VALUES('0001','SHAHID AFRIDI','PAKISTAN',BFILENAME('VOTERIMAGE','AFRIDI.GIF'));

The error is :-
ERROR at line 1:
ORA-00932: inconsistent datatypes

Please somebody help me!

[Updated on: Fri, 28 September 2007 05:07]

Report message to a moderator

Re: Error in inserting image in BLOB column [message #270891 is a reply to message #270889] Fri, 28 September 2007 04:59 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
So what's the error?
Re: Error in inserting image in BLOB column [message #270892 is a reply to message #270891] Fri, 28 September 2007 05:00 Go to previous messageGo to next message
aslamsadia
Messages: 19
Registered: December 2006
Junior Member
ERROR at line 1:
ORA-00932: inconsistent datatypes
Re: Error in inserting image in BLOB column [message #270893 is a reply to message #270892] Fri, 28 September 2007 05:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
desc VOTERID

Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Regards
Michel
Re: Error in inserting image in BLOB column [message #271341 is a reply to message #270889] Mon, 01 October 2007 06:42 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
[** Deleted entry I totally misread the OP. I need coffee]

[Updated on: Mon, 01 October 2007 06:45]

Report message to a moderator

Re: Error in inserting image in BLOB column [message #271351 is a reply to message #270889] Mon, 01 October 2007 07:14 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
From close attention to the Docs you will discover that the BFILENAME function returns a datatype of BFILE. If your table is defined with the column PHOTO being a BLOB, that would explain your error quite nicely.

Sadly, you didn't see fit to share unrelated trivia like the structure of the table with us, so I am reduced to guessing.

Previous Topic: Convert BLOB to VARCHAR2
Next Topic: maltiple condition in select statement
Goto Forum:
  


Current Time: Sat Dec 03 13:52:29 CST 2016

Total time taken to generate the page: 0.23379 seconds