473,406 Members | 2,293 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,406 software developers and data experts.

Update the current page after downloading a file from a database

The current page has:

Response.Write "<a href=""FileDownload.asp?FileNo=" & UbeRS("FileNo") &
""">Down</a>"

FileDownload.asp has:
..
'Update downloaded file status in ubMgtFiles
UbeQ = "UPDATE ubMgtFiles SET Uploaded = NULL, Downloaded = GetDate(),
DownBy = " & Session("StaffNo")
UbeQ = ubeQ & " WHERE FileNo = " & vFileNo
objConn.Execute ubeQ
'Download file
UbeQ = "SELECT FileName, FileFile FROM UbMgtFiles WHERE FileNo = " & vFileNo
UbeRS.Open UbeQ, objConn,,, adCmdText
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "inline;filename=" &
UbeRS("FileName")
Response.BinaryWrite UbeRS("FileFile")
Response.End

The database updates and the file downloads, but I now want to refresh the
current page to display the new file status (ie downloaded when and by
whom). How do I do this?

Thanking you in anticipation.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Aug 10 '06 #1
2 1722
Hi Roger,

Will a Response.Redirect or Server.Transfer not do the trick?

Curtis Hughes
StreamLogic Inc.
http://www.StreamLogicInc.com

Roger Withnell wrote:
The current page has:

Response.Write "<a href=""FileDownload.asp?FileNo=" & UbeRS("FileNo") &
""">Down</a>"

FileDownload.asp has:
.
'Update downloaded file status in ubMgtFiles
UbeQ = "UPDATE ubMgtFiles SET Uploaded = NULL, Downloaded = GetDate(),
DownBy = " & Session("StaffNo")
UbeQ = ubeQ & " WHERE FileNo = " & vFileNo
objConn.Execute ubeQ
'Download file
UbeQ = "SELECT FileName, FileFile FROM UbMgtFiles WHERE FileNo = " & vFileNo
UbeRS.Open UbeQ, objConn,,, adCmdText
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "inline;filename=" &
UbeRS("FileName")
Response.BinaryWrite UbeRS("FileFile")
Response.End

The database updates and the file downloads, but I now want to refresh the
current page to display the new file status (ie downloaded when and by
whom). How do I do this?

Thanking you in anticipation.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Aug 10 '06 #2
Afraid not. If I put response.redirect before the response.end the upload
doesn't start. If I put it after the response.end it is ignored. If I remove
the response.end the upload doesn't start.

"StreamLogic" <co**********@streamlogicinc.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Hi Roger,

Will a Response.Redirect or Server.Transfer not do the trick?

Curtis Hughes
StreamLogic Inc.
http://www.StreamLogicInc.com

Roger Withnell wrote:
>The current page has:

Response.Write "<a href=""FileDownload.asp?FileNo=" & UbeRS("FileNo") &
""">Down</a>"

FileDownload.asp has:
.
'Update downloaded file status in ubMgtFiles
UbeQ = "UPDATE ubMgtFiles SET Uploaded = NULL, Downloaded = GetDate(),
DownBy = " & Session("StaffNo")
UbeQ = ubeQ & " WHERE FileNo = " & vFileNo
objConn.Execute ubeQ
'Download file
UbeQ = "SELECT FileName, FileFile FROM UbMgtFiles WHERE FileNo = " &
vFileNo
UbeRS.Open UbeQ, objConn,,, adCmdText
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "application/x-msdownload"
Response.AddHeader "Content-Disposition", "inline;filename=" &
UbeRS("FileName")
Response.BinaryWrite UbeRS("FileFile")
Response.End

The database updates and the file downloads, but I now want to refresh
the
current page to display the new file status (ie downloaded when and by
whom). How do I do this?

Thanking you in anticipation.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com



Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Aug 10 '06 #3

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

Similar topics

2
by: Ryan Taylor | last post by:
Hello. I am trying to upload a file and save it in a Sql Server 2000 database. This seems to be working fine. However, when I download the file from SQL Server, it appears that the page that is...
4
by: Terry | last post by:
Hello, I am trying to get a response for an .aspx page in my current project (same virtual directory) by using WebRequest.GetResponse but I keep getting a exception with "500 Internal server...
17
by: Dino M. Buljubasic | last post by:
I am building an applicatin that will be able to automatically update itself from an FTP server. I'd like to be able to determine which version of application is newer, the one currently running...
4
by: Ian Davies | last post by:
Hello I have seen some tutorials to put a update a counter field in a record. I have the counter field in a table that also has a field for a path to file. I display the records in a table on...
4
by: DBC User | last post by:
Hi All, I asked this question in clickonce forum and no one seems to answer so I thought I will ask a border experts. I have an application, which uses 2 different set of files based on the...
2
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i...
3
by: laryten | last post by:
Hi, Is there a way to update the same web page instead of getting a new page each time we click the submit button? The simplest thing to do is to delete the current page (or go back to the...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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...

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.