473,574 Members | 2,927 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading Bitmaps from an Access database

I have an access database with a field of "OLE Object" that has
bitmaps. I'm trying to output these bitmaps to an ASP page viewed in
a
webbrowser.
This is how I'm attempting to do this now:
<%
Set conn = Server.CreateOb ject("ADODB.Con nection")
conn.Open "DSN=GLGInvento ry"

strSQL = "SELECT * FROM TableWebThumbs WHERE ID = " &
Request.QuerySt ring("ID") & ""
Set rst = conn.Execute(st rSQL)
Response.Conten tType = "image/bmp"
' let the browser know the file name
'Response.AddHe ader "Content-Disposition", "attachment;fil ename=" &
Trim(rs("filena me"))
' let the browser know the file size
'Response.AddHe ader "Content-Length", rs("filesize")
Response.Binary Write rst("Thumbnail" ).value
rst.Close
Set rst = nothing
conn.Close
Set conn = nothing
%>
I get a nice red X for an unknown image.
Any ideas would be helpful.
Jason

Aug 7 '07 #1
0 1259

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2206
by: Brad Smalling | last post by:
Does anyone know if there is a reason to prefer bitmaps over icons (or vice-versa) when populating image lists? I've always favored icons because of their built-in transparency (although I've never use the invert "color"). But I've noticed that Microsoft seems to favor bitmaps in many of their sample applications. Is there a reason? For...
0
1012
by: martinjeffreys | last post by:
Hi I've a number of Access2002 reports with embedded bitmaps. If the printer print quality is set to 'Normal' all prints OK - if 'Fast' only the text appears. I've tried setting the default printer setting on the PC to 'Normal' - and the printer setting in report design mode to 'Normal'. Whatever though I seem to get random results - with...
1
4943
by: Tim Shih | last post by:
Hi, I'm looking for a way to remotely pass bitmaps and soundfiles via remoting. I have a class which contains a bitmap and I can easily access it remotely as long as I do not set a value for the bitmap. However, when i specify a value for the bitmap I get the 'Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be...
1
2379
by: Mark Evans | last post by:
I have a dialog box and on it I want to display a bitmap, which will change at various times during the program. My problem is that the bitmaps will not be the same each time. I want the user to put their own bitmaps into a directory and the application will pick them off and display them as required. The bitmaps will always be called the...
4
3281
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any errors. After reading the ole object from db, I saved it to C: as file1.bmp and displayed on the web. But it can not be displayed. After I manually sent...
0
1420
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by my asp.net application. I hope someone could help me with this error that I get in windows 2003 server. This error has not occured with the same application in windows 2000 professional computers that are also lot older and less effective.
2
2062
by: Mike | last post by:
Hello everybody. I am drawing a country map that consists of 149 municipality bitmaps, each around 25 Kb. I draw it onto the in-memory bitmap, then draw it on the picture box. I use C++, but anyways if I were using the C# the question would be the same. And here is the problem: it takes 700 ms to draw it, and anything above 300 ms is...
1
2722
by: nkumarin001 | last post by:
Hi, Can anyone help me in this matter:- When i was studying locally managed tablespaces i came across bitmaps that are used in locally managed tablespaces it stated that:- "Locally managed tablespaces use bitmaps stored within the header of the datafiles comprising a tablespace to track the space utilization of the tablespaces." ...
3
1993
by: billgadget | last post by:
Can anyone offer some advice as to whether it would be feasible to generate bitmaps images, such as geographic maps with data contours and political boundaries drawn on top? I have a bunch of scientific data (satellite derived AVHRR data to be precise) that I will be importing into a MySQL database and would like to create a web interface...
0
8053
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7817
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8098
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6454
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5301
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3741
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3752
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.