Updating ORACLE BLOB using ASP 3.0/IIS5.0 [message #100626] |
Mon, 17 March 2003 06:39 |
Adrian Gay
Messages: 1 Registered: March 2003
|
Junior Member |
|
|
Updating ORACLE BLOB using ASP 3.0/IIS5.0
=========================================
I have an ORACLE database server (8.1.6) with database and a WEB Server that using IIS5.0/ASP 3.0.
I am trying to update a BLOB Column, using ASP having successfully uploaded an image file (sample.jpg) to the Web Server and saved it to the file system. I have used 0040 - Oracle Objects for OLE (which by the way is very fast and very stable – great stuff) to connect to and to write tabular information to the database. Having written my tabular information I update the BLOB field first setting it to EMPTY_BLOB():
MySQL = "UPDATE PHOTOS SET IMGTHUMBNAIL = EMPTY_BLOB() where ID = " & TheRowID
Response.Write ( "
MySQL = " & MySQL )
rowcount = OraDatabase.ExecuteSQL(MySQL)
I then attempt to load my image file using the following method
MySQL = "SELECT * FROM photos where ID = " & TheRowID
Set OraDynaset = OraDatabase.DbCreateDynaset(MySQL, cint(0))
set ThumbNailImage = OraDynaset.Fields("IMGTHUMBNAIL").Value
OraDynaset.Edit
ThumbNailImage.CopyFromFile “c:temp8thumb.jpg”
OraDynaset.Update
This results in the error, I have looked up the error code but there is no more information:
Oracle Automation error '800a01b8'
OIP-04906: LOB operation failed. Unable to open specified file.
/DfAPhotos/uploadphoto.asp, line 631
Has any one got any suggestion what might be going on here?
I assume that “c:temp8thumb.jpg” should be on the WEB server and not the DB Server?
Has any one get a better example of doing this in ASP? Perhaps using the “Multiple Piece Write Operation”?
|
|
|
|