473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

BinaryWriting Excel Blobs

Hi group, I have a nice little CMS application which has been running
for quite some time storing content in blobs in sql (the 'image'
datatype) and spitting them out to a frame in the browser via a page
called showContent.aspx:

Response.ContentType = strContentType
Response.BinaryWrite(objFileObject)

However, Excel seems to display some rather odd behaviour:

1/ When someone already has an Excel page open in the frame, they get:
"A document with the name showContent.aspx is already open..."
Does this mean that if the content type is excel, I need to redirect to
showContent2.aspx, showContent3.aspx, etc. *randomly*, so that it's
always a different name?? I'm prepared to do this, if it will solve the
problem, but it just seems like a real hack. I'm also toying with the
idea of storing excel docs physically, rather than as blobs in the db,
but that again would be a real pain.

2/ After the second or third excel sheet, excel seems to let them
through anyway and we get a string of "File error: data may have been
lost" errors (presumably to do with how the 'file' is being opened). If
you then click on any of the tabs of the excel sheet once it has limped
through this, the tab on the excel sheet disappears...!

Just wondering if I am doing anything obviously wrong re binarywriting
excel, and if so what I should be doing, although all other formats
seem to work fine (incl. pdf, flash, images, word, everything really!)

Any feedback is much appreciated, and if you would like any further
info (versions, etc.) then let me know but it's all up to date and
patched (and happening on multiple client machines).

Many thanks,
Mark

Nov 19 '05 #1
1 1743
FYI, I decided to implement an ugly hack:

If CInt(Session("ExcelHack")) = 1 Then
Session("ExcelHack") = 2
Else
Session("ExcelHack") = 1
Response.Redirect("showContent2.aspx")
End If

If anyone knows of a tidier way of fixing this, then do let me know.

Many thanks,
Mark

Nov 19 '05 #2

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

Similar topics

1
by: Kirby Urner | last post by:
I've been testing the Cookbook example 8.6 (2002 edition) re using cPickle to insert and retrieve BLOBs from mySQL, using Python's MySQLdb module. When I try to cPickle.loads(blob), I get an...
0
by: Ole Hansen | last post by:
Hi, I have a working application inserting rows to a table using the array interface. Now I want to insert BLOBs as well but OCIStmtExecute crashes when executed with BLOBs. For BLOB types I...
0
by: Ole Hansen | last post by:
Hi, Is it at all possible to insert BLOBs using the Array Interface? Today I have an application using the array interface. It works fine but so far I haven't been using BLOBs. I insert...
1
by: picaza | last post by:
hi, does anyone have a perl example of loading blobs from either a bin file or an input stream? much thanks, peter
2
by: Ike | last post by:
I have blob fields in some tables - never more than one field in any table, and never where a blob can be > 64k. I have inherited the code for this project from someone else, and was considering...
7
by: Howard Lowndes | last post by:
My situation is that I am interacting PHP 4.1.2 to PostgreSQL 7.2.2 I have no difficulty inserting and managing BLOBs into the Large Object system table, and I have a user table called images...
7
by: Nilabhra Banerjee | last post by:
Hi, I am still not sure whether the BLOBS are actually stored in the database or they have the pointer to the database for that file in the filesystem. If I remove the files (sources) for BLOBS...
0
by: Bing | last post by:
Hi there, I am using the DB2 universal JDBC driver type 4 to insert BLOBs into a DB2 database. The Method I used for supplying the BLOB data value is setBinaryStream(). Everything works fine as...
2
by: Jerry LeVan | last post by:
Hi, I am just getting into large objects and bytea "stuff". I created a small db called pictures and loaded some large objects and then tried to do a restore. Here is how I got the dump. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.