dim nodes
dim conn
dim sXML
dim R
dim cm
' 创建DOMDocument对象
Set xml = Server.CreateObject('msxml2.DOMDocument')
xml.async = False
' 装载POST数据
xml.Load Request
If xml.parseError.errorCode <> 0 Then
Call responseError('不能装载 XML信息。 描述: ' & xml.parseError.reason & '
行数: ' & xml.parseError.Line)
End If
' 客户端必须发送一个commandText元素
Set N = xml.selectSingleNode('command/commandtext')
If N Is Nothing Then
Call responseError('Missing <commandText> parameter.')
Else
commandText = N.Text
End If
' 客户端必须发送一个returnsdata或者returnsvalue元素
set N = xml.selectSingleNode('command/returnsdata')
if N is nothing then
set N = xml.selectSingleNode('command/returnsvalues')
if N is nothing then
call responseError('Missing <returnsdata> or <returnsValues> parameter.')
else
returnsValues = (lcase(N.Text)='true')
end if
else
returnsData=(lcase(N.Text)='true')
end if
set cm = server.CreateObject('ADODB.Command')
cm.CommandText = commandText
if instr(1, commandText, ' ', vbBinaryCompare) > 0 then
cm.CommandType=adCmdText
else
cm.CommandType = adCmdStoredProc
end if
' 创建参数
set nodes = xml.selectNodes('command/param')
if nodes is nothing then
' 如果没有参数
elseif nodes.length = 0 then
'
| 对此文章发表了评论 |
