0
votes

I've been working on getting a image to show in a field whenever the item exists. The value is stored in a BLOB column in my database in a fields called ID_FILE and Signature.

All my efforts so far have given me the inconsistent datatype errors. I created a 'Display image field' (2X) with a blob Column Specified in Item source. Then in a pre-rendering Process i'm running the following code.

DECLARE
v_klantNR number;
BEGIN
SELECT CUSTOMER_ID INTO v_klantNR FROM TOCBA_CUSTOMERS WHERE FIRSTNAME =       :P1010_FIRSTNAME AND LASTNAME = :P1010_LASTNAME;
SELECT 
BSN, 
ID_NUMBER, 
ID_TYPE, 
ID_FILE, 
SIGNATURE
INTO 
:P1010_BSN, 
:P1010_IDNUMBER, 
:P1010_IDTYPE, 
:P1010_GEUPLOAD_ID, -- This is the one
:P1010_GEUPLOAD_HANDTEKENING -- This is the other one
FROM TOCBA_IDENTIFICATION
WHERE CUSTOMER_ID = v_klantNR;
END

Error ORA-06550: line 8, column 11: PL/SQL: ORA-00932: inconsistent datatypes: expected CHAR got BLOB ORA-06550: line 5, column 1: PL/SQL: SQL Statement ignored

-- I understand that the Display Image field is expecting a CHAR value and is getting my BLOB value. I think that whenever Oracle APEX expects a BLOB value, and displays this, it should work. Is there a setting for this?

1

1 Answers

0
votes

I'm still not sure what the reason for this particular error was. However, getting an automatic row fetch on the table to get the items fixed it for me.