Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Counting the number of downloads

Reply
Thread Tools

Counting the number of downloads

 
 
Luc Dal
Guest
Posts: n/a
 
      06-03-2005
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


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-03-2005
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"


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      06-03-2005
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" <(E-Mail Removed)> a écrit dans le message de
news:d7pbuo$rbc$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting number of exceptions in a Java class Manu Mahendru Java 5 01-10-2006 07:54 PM
OT: Number Nine, Number Nine, Number Nine Frisbee® MCSE 37 09-26-2005 04:06 PM
counting up instead of counting down edwardfredriks Javascript 6 09-07-2005 03:30 PM
Counting number of enquiries sent to partner - live and intelligent Darren ASP .Net 0 01-26-2004 01:23 AM
XSLT - counting the number of xsl:if which are true... Lizard XML 3 10-07-2003 10:51 PM



Advertisments