Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Retrieve Oracle BLOB into asp
Hi!
I am trying to retrieve an Oracle BLOB fields into my ASP page.
I am using Oracle 8.0 database and IIS4.0
I tried FileASP-upload and Software Artisans dlls and they both worked fine but only with Intersolv Oracle ODBC driver. (Microsoft and Oracle drivers did not work).
Since Intersolv licensing fee is very high, I tried OLE DB and got that infamous message ORA-00000: normal, successful completion with error '80004005'.
Then I read somewhere that people were getting good results with Oracle Objects OO4.0 for OLE.
This is the code I used:
<%
MaxSize = 700000
Response.Expires = 0 Response.Buffer = TRUE Response.Clear Response.ContentType="image/gif"
'Declare variables as OLE Objects.
Dim MySession
Dim MyDatabase
Dim MyDynaset
Dim strSQL
strSQL= "Select blob_image From tbl_blob where blob_id = 1"
Set MySession = CreateObject("OracleInProcServer.XOraSession") Set MyDatabase = MySession.OpenDatabase("server_name", "uid/pwd", 0) Set MyDynaset = MyDatabase.CreateDynaset(strSQL,0) -------> error line
Response.BinaryWrite MyDynaset("blob_image").getchunk(maxsize)
Response.End
%>
... and this is the error I got at the error line:
SQL execution error, ORA-00932: inconsistent datatypes
Can anyone help me with this.
Thanks,
Rajko Jovanovic
Florida Power & Light
Miami, Florida
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 02 1998 - 07:35:23 CST