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
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.
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!"
This behavior is by design.
For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
APPLIES TO
- Microsoft Commerce Server 2002 Standard Edition
| 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