<%
'Carrage Return + Line Feed pair
Dim CRLF
CRLF = CHR(13) + CHR(10)
Sub DisplayCheckError(ByRef objSchemaError)
Dim strId
Dim strSeverity
Dim strDescription
Dim strKey
Dim strProperty
strId = CStr(objSchemaError.Id)
strSeverity = CStr(objSchemaError.Severity)
strDescription = objSchemaError.Description
strKey = objSchemaError.Key
strProperty = CStr(objSchemaError.Property)
Response.Write("Id: " & strId & "
" & CRLF)
Response.Write("Severity: " & strSeverity & "
" & CRLF)
Response.Write("Description: " & strDescription & "
" & CRLF)
Response.Write("Key: " & strKey & "
" & CRLF)
Response.Write("Property: " & strProperty & "
" & CRLF)
End Sub
Dim objMetaUtil
Dim objSchemaErrors
Dim objSchemaError
'Create the MetaUtil object
Set objMetaUtil = Server.CreateObject("MSWC.MetaUtil.1")
'Check the schema of "LM"
Response.Write("Check the schema of ""LM""
" & CRLF)
Set objSchemaErrors = objMetaUtil.CheckSchema("LM")
'Enumerate and display the errors
Response.Write("Enumerate the errors:
" & CRLF)
For Each objSchemaError In objSchemaErrors
DisplayCheckError objSchemaError
Response.Write("
" & CRLF)
Next
Response.Write("
" & CRLF)
Response.Write("Done
")
'Clean up the reference to IIS.MetaUtil
Session.Abandon
%>