Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

BLOB content download link on apex report

902143Jan 9 2012 — edited Jan 9 2012
Hi Guys,

I have a simple form where user can attach file and save the records. I iterate through wwv_flow_files and get the file and save it to a custom table which has BLOB column. On another report page i display uploaded file details. What i need is, there must be a column with download link when user clink the link appropriate file should be downloaded. How can i do this ?

Really appreciate if someone can assist me on this.
Thanks Guys.
This post has been answered by fac586 on Jan 9 2012
Jump to Answer

Comments

John Fedak

The issue here is that Oracle supports more precision than the native .Net CLR types

You can work around this using the DataAdapter, specifying ReturnProviderSpecificTypes, and then manually adjusting the precision on the OracleDecimal before conversion.

I would really like to see a setting on the driver that allows you to tell it that you don't care about the precision differences and just to round the value.

This is what users would want outside of extremely rare cases where the extra precision is actually needed.

user8091922
Answer

Same problem here. We just changed our project from Microsoft's deprecated Oracle client to ODP.NET. Once we rolled out the change .. BOOM ... InvalidCastException on Oracle.ManagedDataAccess.Client.OracleDataReader. We fixed that problem by adding a cast to the select statement, but the danger is that this will crop up again anywhere a division operator is used (or perhaps in some other scenario that we currently are not thinking of).

I get the reason why this happens, but I would still consider it a bug. If for no other reason than the fact that the behavior is completely unexpected. Calling ExecuteScalar against a valid SQL statement would not ever be expected to toss an InvalidCastException deep within the Oracle.ManagedDataAccess library. It violates the Principle of Least Astonishment.

===============

This message is from Alex Keh, ODP.NET product manager:

In ODP.NET 20c, there will be a new Boolean property on the DataReader and DataAdapter called SuppressGetDecimalInvalidCastException. When set to true, the exception will be suppressed and the value will be rounded for .NET Decimal. This new property should address this issue.

Marked as Answer by user4977350 · Sep 27 2020
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 6 2012
Added on Jan 9 2012
1 comment
4,050 views