Funny one that we've been scratching our heads over all afternoon.

Our client needs a document tracking system, which allows authorized
users to view PDF files. For legal reasons they want to track the date,
time and IP Address of who views these documents.

This is the code I'm using

<cfquery datasource="theDB" name="logDocView">
  INSERT into docLog
  (documents_ID, dateViewed, ipAddress)
  VALUES
  (#DocID#, #CreateODBCDateTime(now())#, '#CGI.remote_addr#')
 </cfquery>

<cflocation url="documents/#docFilename#">

When we run this query, we end up with three records in the database. If
I do a CFLocation to a CFM file instead of a PDF file I only get one
record inserted. Plus if I remove the CFLocation and replace it with a
<a href> it also inserts just one record. Grrrr!

Anyone seen this one?

Cheers


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to