Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI: How to insert BLOB?
Returning clause does works especially prior to Oracle 9. However
'returning' SQL construct has some disadvantages and AFAIK it is not a
recommended choice for Oracle 9i onwards.
For one, you cannot send data to a stored proc. You can with OCILobLocator.
Further with returning clause you need to do two step execution. In that
case, your table integrity is not consistent because in first execution you
have just inserted EMPTY_CLOB which refers to a temporary buffer area.
Suppose before you have send the data, another thread tries to read the
data?
This is not a problem with OCILobLocator.
Want ease of development or performance? Why not get both! http://www.roguewave.com/products/sourcepro/db/
[Disclaimer: All views expressed here are my personal views and they can be incorrect at times]
"stuart coupe" <stuart.coupe_at_easysoft.com> wrote in message
news:bj48ca$ff1s1$1_at_ID-205574.news.uni-berlin.de...
>
> Try using the 'returning' SQL construct.
> The manuals describe it better than I can ;)
>
> Cheers,
> Stuart.
>
> On Tue, 02 Sep 2003 16:34:55 +0200, Ole Hansen wrote:
>
> > Hi,
> >
> > Is it possible to insert BLOB data without doing a select first? I have
> > data available and want to insert a row with BLOB data.
> >
> > Should I use the callback function with OCILobWrite() or is it not
> > possible at all without doing a select?
> >
> > How about using a temporary LOB? I have tried everything I could come up
> > with but nothing seems to work.
> >
> > Thanks in advance?
> > Br,
> > Ole Hansen
>
Received on Thu Sep 04 2003 - 14:30:21 CDT
![]() |
![]() |