Microsoft Knowledge Base Email Alertz

You cannot import the TIME_TAKEN field values from the extended IIS logging properties of the IIS log

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 910251 - Last Review: March 14, 2007 - Revision: 1.4

You cannot import the TIME_TAKEN field values from the extended IIS logging properties of the IIS log

SYMPTOMS

In Microsoft Commerce Server 2002, you cannot import the TIME-TAKEN field values from the extended Microsoft Internet Information Services (IIS) logging properties of the IIS log.

WORKAROUND

To work around this problem, you can extend the Commerce Server 2002 Data Warehouse schema. To do this, use the following code.
'----------------------------------------------------------------
‘This program provides the sample code for extending the Commerce Server 2002 Data Warehouse schema by using 
'Microsoft OLE DB Provider for Commerce Server and the ADO API by using the Microsoft Visual Basic Scripting Edition (VBScript) language.
‘This program creates a member of the Request class to implement the TIME-TAKEN field.
'----------------------------------------------------------------

'1. Set connections
'----- Set Provider connection -----
'ADO 2.5 connect string

'Note You must modify the connection string to match the environment.

strURL = "URL=mscop://InProcConnect/Server=SQLSERVER:database=cs2002StarterSite_dw:catalog=DWSChema:user=sa:password=password:FASTLOAD=True"

Dim oCn
Dim oCmd

set oCn = createobject("ADODB.Connection")
set oCmd = createobject("ADODB.Command")

oCn.Open strURL 'Open the connection to the OLE DB provider.
Set oCmd.ActiveConnection = oCn

Wscript.Echo "BEGIN!"

'-------------------------------------------------
' Turn on schema change mode.
'------------------------------------------------
oCmd.CommandText = "SchemaMode=1"
oCmd.Execute
Wscript.Echo "Schema mode set..."

Const adModeWrite = 3
Const adCreateOverwrite = 2

'---------------------------------------------------------------
'Create a TIME-TAKEN member in the Request class.
'---------------------------------------------------------------
Set recNew = CreateObject("ADODB.Record")
recNew.Open "Member/Request/TimeTaken", oCn, _
adModeWrite, adCreateOverwrite

'Set the attributes.
recNew("ClassDefName") = "Request"
recNew("TypeName") = "ULONG"
recNew("Description") = "Time Taken for a request."
recNew("IsPrimaryKey") = 0
recNew("DefaultValueAsStr") = "{00000000-0000-0000-0000-000000000000}"
recNew("MemberDefName") = "TimeTaken"
recNew("GenerateColumnDef") = 1

'Save the new row.
recNew("__Commit") = 1
recNew.Fields.Update
recNew.Close
'-------------------------------------------------
' Commit the schema.
'-------------------------------------------------
oCmd.CommandText = "CommitSchema"
oCmd.Execute

'-------------------------------------------------
' Turn off schema change mode.
'------------------------------------------------
oCmd.CommandText = "SchemaMode=0"
oCmd.Execute

set oCn = nothing 'data flush here for fastload set oCmd = nothing set recNew = nothing

WScript.Echo "End!"

STATUS

This behavior is by design.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
http://msdn2.microsoft.com/en-us/library/ms952822.aspx (http://msdn2.microsoft.com/en-us/library/ms952822.aspx)
http://msdn2.microsoft.com/en-us/library/ms967162.aspx (http://msdn2.microsoft.com/en-us/library/ms967162.aspx)

APPLIES TO
  • Microsoft Commerce Server 2002 Standard Edition
Keywords: 
kbinfo kbhowto kbprb KB910251
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate