I am trying to insert blank data in blob column of table using C program in oracle database but it is inserting as Null, How to make it blank instead of null.data type is lpBlob.
1 Answer
Depending on your definition of "blank", my assumption is that you want to use the empty_blob function
INSERT INTO table_name( ..., blob_column_name )
VALUES( ..., empty_blob() );
9 Comments
user1773207
I am not using sql, I am inserting the data using C program
Justin Cave
@user1773207 - Presumably, your C application is issuing SQL statements (either directly or via some client API). If you want to insert an empty BLOB, you'd need to use the
empty_blob function.user1773207
I tried to fill blob with blank but still it is inserting null in oracle, Is there any function in C like java to insert empty blob.
Justin Cave
@user1773207 - What API are you using? OCI? OCCI? Something else? Can you edit your question to include the code that you're using?
user1773207
I am using OCI API, same code is working for other database(SQL server /DB2) but for oracle database it is inserting as NULL in blob field.
|
blank- short answer, fill your blob with 0x20 (that's spaces)