DOC: "Site Hits Log" Documentation Sample Code is Incorrect
ID: Q194020
|
The information in this article applies to:
-
Microsoft Visual InterDev, version 6.0
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);
}
Additional query words:
Keywords : kbdocfix kbVisID600 kbGrpASP
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type :