DOC: "Site Hits Log" Documentation Sample Code is Incorrect (194020)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q194020

SUMMARY

The code provided in the Microsoft Developer Network (MSDN) Help for the "Site Hits Log" sample is incorrect.

MORE INFORMATION

The code that is supplied in the documentation is as follows:

      function CounterRecordset_ondatasetcomplete(){
         CounterRecordset.addImmediate();
         CounterRecordset.fields.setValue("Remote_Host",
   Request.ServerVariables("Remote_Addr"));
         CounterRecordset.fields.setValue("Path_Info",
   Request.ServerVariables("Path_Info"));
         CounterRecordset.fields.setValue("HTTP_User_Agent",
   Request.ServerVariables("HTTP_User_Agent"));
         CounterRecordset.updateRecord();
      }
				


The correct code is as follows:

      function CounterRecordset_ondatasetcomplete(){
         fieldsArray = new Array
                  ("Remote_Host","Path_Info","HTTP_User_Agent");
         valuesArray = new Array(Request.ServerVariables("Remote_Addr"),
   Request.ServerVariables("Path_Info"),
   Request.ServerVariables("HTTP_User_Agent");
         CounterRecordset.addIddImmediate(fieldsArray, valuesArray);
      }
				

Modification Type:MinorLast Reviewed:3/16/2005
Keywords:kbdocfix KB194020