Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageLuc 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"
Post Follow-up to this messageNot 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 > >
Post Follow-up to this messageStream 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 > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.