Microsoft KB Archive/910251

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

Article ID: 910251

Article Last Modified on 3/14/2007

-

APPLIES TO


 * Microsoft Commerce Server 2002 Standard Edition

-





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 = &quot;URL=mscop://InProcConnect/Server=SQLSERVER:database=cs2002StarterSite_dw:catalog=DWSChema:user=sa:password=password:FASTLOAD=True&quot;

Dim oCn Dim oCmd

set oCn = createobject(&quot;ADODB.Connection&quot;) set oCmd = createobject(&quot;ADODB.Command&quot;)

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

Wscript.Echo &quot;BEGIN!&quot;

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

Const adModeWrite = 3 Const adCreateOverwrite = 2

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

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

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

'- ' Turn off schema change mode. ' oCmd.CommandText = &quot;SchemaMode=0&quot; oCmd.Execute

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

WScript.Echo &quot;End!&quot;



STATUS
This behavior is by design.

