Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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



Report this thread to moderator Post Follow-up to this message
Old Post
Luc Dal
06-03-05 01:55 PM


Re: Counting the number of downloads
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"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
06-03-05 08:55 PM


Re: Counting the number of downloads
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" <dal@sped.ucl.ac.be> a écrit dans le message de
news:d7pbuo$rbc$1@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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Patrice
06-03-05 08:55 PM


Re: Counting the number of downloads
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" <dal@sped.ucl.ac.be> wrote in message
news:d7pbuo$rbc$1@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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Curt_C [MVP]
06-03-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:44 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.