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

Counting the number of downloads

Hello

On a site, I've documents that can be downloaded.
To fill the html page, I read a table in an access database and I write my
code
Each document has a title, an url, an id and a variable "counter"
How can I increment the counter (in the database) and open the docuemnt in
the same operation ???
Thanks for your assistance
Luc
Jul 22 '05 #1
3 1282
Luc Dal wrote:
Hello

On a site, I've documents that can be downloaded.
To fill the html page, I read a table in an access database and I
write my code
Each document has a title, an url, an id and a variable "counter"
How can I increment the counter (in the database) and open the
docuemnt in the same operation ???
Thanks for your assistance
Luc


You can't. You will need two queries: one to perform the increment, and the
other to retrieve the data.

With SQL Server, you could use a stored procedure.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2
Not sure what you meant but my understanding is that the problem might be
that you are using direct links to your documents making uneasy to handle
the download process (as IIS handles this for you and no code is
trigerred)...

Another approach would be to create links to an ASP download page. This page
would then "stream" the file to the browser and would update the counter (as
you'll have now your won code triggered when the user starts the download).

Try :
http://support.microsoft.com/kb/260519/en-us (for raising the download
dialog client side)
http://support.microsoft.com/kb/276488/en-us (for streaming the file)

Addtionaly it allows to put the files outside of the web site and to perform
whatever checks you might want before letting the use download the file...

--

Patrice

--

"Luc Dal" <da*@sped.ucl.ac.be> a écrit dans le message de
news:d7**********@ail.sri.ucl.ac.be...
Hello

On a site, I've documents that can be downloaded.
To fill the html page, I read a table in an access database and I write my
code
Each document has a title, an url, an id and a variable "counter"
How can I increment the counter (in the database) and open the docuemnt in
the same operation ???
Thanks for your assistance
Luc

Jul 22 '05 #3
Stream the document to the client.
That way you can perform any other operations, like hit counts, prior to
feeding it.
http://www.darkfalz.com/1098
--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Luc Dal" <da*@sped.ucl.ac.be> wrote in message
news:d7**********@ail.sri.ucl.ac.be...
Hello

On a site, I've documents that can be downloaded.
To fill the html page, I read a table in an access database and I write my
code
Each document has a title, an url, an id and a variable "counter"
How can I increment the counter (in the database) and open the docuemnt in
the same operation ???
Thanks for your assistance
Luc

Jul 22 '05 #4

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

Similar topics

9
by: NiQ | last post by:
Hello every one, this is about an array of string and may be have done several time before but i need it and wasnt able to find it so here is the problem i have an array of strings with contains...
1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
3
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let...
18
by: ChadDiesel | last post by:
I appreciate the help on this group. I know I've posted a lot here the last couple of weeks, but I was thrown into a database project at my work with very little Access experience. No other...
7
by: sathyashrayan | last post by:
Group, Following function will check weather a bit is set in the given variouble x. int bit_count(long x) { int n = 0; /* ** The loop will execute once for each bit of x set,
1
by: j | last post by:
Hi, I've been trying to do line/character counts on documents that are being uploaded. As well as the "counting" I also have to remove certain sections from the file. So, firstly I was working...
3
by: newstips6706 | last post by:
The Art of Counting TIME -------------------------------------------------------------------------------- As the research done on the paper titled: "The Number '1'", which yielded the...
0
by: Chris Thomasson | last post by:
Here are the pre-alpha code downloads: http://appcore.home.comcast.net/vzoom/refcount/ (both C and C++ api here...) Here is some pre-alpha documentation: ...
3
by: nitric | last post by:
hey guys, i'm really stuck on this program. It's basically a survey and I have to ask people what drinks they like. 1-4, coffee tea oj and lemonade. i'm having trouble counting the TOTAL NUMBER...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.