Ask a Question related to ASP Database, Design and Development.
-
Sean #1
Can't display images stored as Oracle BLOBs
I have been fighting with storing/retrieving images in an Oracle
database using ASP for over a month now. I have been able to store
images < 64K w/ no problems. However, images > 64K have been a problem
since day one. We've updated our ODBC drivers and it appears that
images > 64K are being stored ... well, more correct than before.
Prior to the new drivers, retrieving any image > 64K only returned
4KB. Now I'm getting the correct number of bytes back, but images >
64K still give me the broken image icon, even though it does seem to
know how large the image is supposed to be. Images < 64K continue to
display just fine.
I am at my wits end. I had to learn ASP for this project and I really
don't know where to go from here. Everything I've found on the web
makes it sound like this should be idiot simple. I've tried as many
varations of AppendChunk and GetChunck as I can think of. I'm not even
sure if the problem is during storage or retrieval.
Any advice/help will be greatly appreciated.
-Sean
Sean Guest
-
oracle mx stored procedure
"Error Executing Database Query. Incorrect parameter bindings for stored procedure call. Check your bindings against the stored procedure's... -
Oracle Stored Proc
How do I catch the oracle error code when executing a stored proc in CF? I am running 9i. Thanks Norm -
BLOBs in Oracle
I need to store and retrieve BLOBs in Oracle 10 through CFMX. Can someone provide sample code for how I can do that? (i.e., CFQUERY and related... -
oracle, asp, stored procedure
I am trying to run a stored procedure from an asp page on an oracle 9i db. The stored procedure will take one parameter and should return two... -
perl dbi oracle and blobs
dominant wrote: I would suggest you read: perldoc DBI and perldoc DBD::Oracle -- $a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca... -
Cowboy \(Gregory A Beamer\) #2
Re: Can't display images stored as Oracle BLOBs
To use BLOBs effectively, you have to use the GetChunk() method pr an
ADODB.Stream object. You should be able to find some examples on the net.
--
Gregory A. Beamer
MPV; MCP: +I, SE, SD, DBA
************************************************** ********************
Think outside the box!
************************************************** ********************
"Sean" <sean-h@bigfoot.com> wrote in message
news:ab5d5ddb.0309030941.105f7707@posting.google.c om...> I have been fighting with storing/retrieving images in an Oracle
> database using ASP for over a month now. I have been able to store
> images < 64K w/ no problems. However, images > 64K have been a problem
> since day one. We've updated our ODBC drivers and it appears that
> images > 64K are being stored ... well, more correct than before.
> Prior to the new drivers, retrieving any image > 64K only returned
> 4KB. Now I'm getting the correct number of bytes back, but images >
> 64K still give me the broken image icon, even though it does seem to
> know how large the image is supposed to be. Images < 64K continue to
> display just fine.
>
> I am at my wits end. I had to learn ASP for this project and I really
> don't know where to go from here. Everything I've found on the web
> makes it sound like this should be idiot simple. I've tried as many
> varations of AppendChunk and GetChunck as I can think of. I'm not even
> sure if the problem is during storage or retrieval.
>
> Any advice/help will be greatly appreciated.
>
> -Sean
Cowboy \(Gregory A Beamer\) Guest
-
Sean #3
Re: Can't display images stored as Oracle BLOBs
I am using GetChunk. If I right click and save the target to disk, the
resulting file opens and displays just fine in any photo viewer of
choice. However, if I click on the link to display the image in the
browser, I get a broken image icon. It seems very odd to me that this
should happen only with images > 64K. Is there some quirk to
ASP/BinaryWrite I should be aware of?
This is my code. As you can see I've tried writing the image data as
one block and breaking it up using GetChunk. I've also tried different
chunk sizes. Nothing works if the image is > 64K.
-Sean
<%
dim objConn
DBObjConn() 'Open database
id = Request.QueryString("id")
cmdsql = "SELECT vcfiletype, imagedata from pictures_blob WHERE
vcpartnumber ='"&id&"'"
set rs = objConn.execute( cmdsql )
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = rs("vcfiletype")
'temp = rs("imagedata")
'Response.BinaryWrite temp
Do
temp = rs.Fields("imagedata").getChunk(1024)
If isNull( temp ) Then Exit Do
Response.BinaryWrite temp
Loop
rs.close
Response.End
%>
"Cowboy \(Gregory A Beamer\)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message news:<#BWmPBNdDHA.904@TK2MSFTNGP11.phx.gbl>...
> To use BLOBs effectively, you have to use the GetChunk() method pr an
> ADODB.Stream object. You should be able to find some examples on the net.
>
> --
> Gregory A. Beamer
> MPV; MCP: +I, SE, SD, DBA
>
> ************************************************** ********************
> Think outside the box!
> ************************************************** ********************
> "Sean" <sean-h@bigfoot.com> wrote in message
> news:ab5d5ddb.0309030941.105f7707@posting.google.c om...> > I have been fighting with storing/retrieving images in an Oracle
> > database using ASP for over a month now. I have been able to store
> > images < 64K w/ no problems. However, images > 64K have been a problem
> > since day one.Sean Guest



Reply With Quote

