Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-00932 unexpected datatypes: expected - got BLOB

Status
Not open for further replies.

golfit007

Programmer
Mar 3, 2010
5
0
0
US
I am currently using Crystal Reports XIR2SP2 and I am accessing an Oracle 11g database. I am using the tnsnames.ora file for connectivity. The database has some new features and we are now able to store employee photos in the database. The field is a Picture datatype which is a BLOB. My report runs fine until I place the field on the detail section of the report. Once I do this then I get the error message "ORA-00932 unexpected datatypes: expected - got BLOB". According to the Help a BLOB is a valid type and can be displayed. I have 7 years with Crystal Reports but this is my 1st BLOB field. If anyone has had this error in the past please let me know. I have tried connecting as an OLE DB and ODBC and the error message is the same.

I have also tested this in CR2008 thinking that it just might be the version. This was also using 11g client and 11g database with a tnsnames.or file and it also fails.

Thank you
 
What type of format is the picture stored in? I have been able to successfully display .jpg images through Oracle blob fields, but not .gif images. Also, I've not been able to get it to work through an ODBC connection, only though a Native Oracle connection or an OLE DB connection.

Also, if you're using Crystal 2008 or 2011, there is another way to do this besides just putting the blob on the report. Instead you can do this:

1. Add an image to the report using a default (preferably blank) image file.
2. Right-click on the image and select "Format Graphic".
3. Go to the "Picture" tab.
4. Click on the button by "Graphic Location:"
5. Select the blob field that contains the image.

I don't think the graphic location was available in XI r2, but I don't have that version installed so I can't check it.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Dell:

I have not used this forum but a couple time and I looked for a way to submit this directly to you but do not see it so I have added to the thread.

What type of format is the picture stored in? ther images will be store in .jpg formats. Currently the field is empty so that is why I wondering why it would give an error when the field is empty. IF I just display the picture field and only use the table that contains the picture it dipslays a blank image and does not give and error. Once I connect the table to the person then it is here that it fails. I am using Native tnsnames file connectivity. I only tried the others as the error message really does not provide enough information to know what one is doing wrong. I need to be able to display the field if it is blank as not all employees will have a picture. I have just selected the field that is picture format and I have placed it in the details section. If I try what you have outlined below then I get an error message: "A blob field cannot be used in a formula."

So the report will display a picture if one is there otherwise it will just be blank. As you have outlined below is what I have tried to do:

Let me know if there are any questions or you need more clarity.

Thanks,

The Get Location is available in XIR2. I have also tried it in CR2008 and I am getting the same error message.

Also, if you're using Crystal 2008 or 2011, there is another way to do this besides just putting the blob on the report.
Instead you can do this:

1. Add an image to the report using a default (preferably blank) image file.
2. Right-click on the image and select "Format Graphic".
3. Go to the "Picture" tab.
4. Click on the button by "Graphic Location:"
5. Select the blob field that contains the image.

I don't think the graphic location was available in XI r2, but I don't have that version installed so I can't check it.

 
The formula was just a thought on my part - I haven't had to do it that way because the images always came through correctly in my reports. It has been several years since I worked with images like this, but I know I had it working in Crystal 2008 using a native connection like yours. This was against Oracle 10, not 11, though.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top