急救ADODB.Recordset 错误 '800a0cc1'
publicsubdoExecuteInsert(byvalstrSQL,byvalstrFields,byvalstrTree)dimtmpRS,iisettmpRS=...
public sub doExecuteInsert(byval strSQL,byval strFields,byval strTree)
dim tmpRS,ii
set tmpRS=Server.CreateObject("ADODB.Recordset")
if instr(strSQL," ")<1 then strSQL="select top 1 * from "&strSQL
doExec tmpRS,strSQL,1,3
'if not tmpRS.eof Then
tmpRS.addnew
if len(strFields)>0 Then
dim tmpAry,aa
tmpAry=split(strFields,",")
for aa=0 to ubound(tmpAry)
'debug tmpAry(aa)&"-"&opsTest.toVariable(strTree.getItem(tmpAry(aa)),"")&"<br>"
tmpRS(tmpAry(aa))=toFormatValue(strTree.getItem(tmpAry(aa)))
next
else
strTree.doBegin()
for ii=1 to strTree.getCount()
'debug strTree.getItemKey()&"<br>"
tmpRS(strTree.getItemKey())=opsCode.toString(strTree.getItemValue())
strTree.doMove()
next
end if
tmpRS.update
'end if
tmpRS.close
set tmpRS=nothing
end sub 展开
dim tmpRS,ii
set tmpRS=Server.CreateObject("ADODB.Recordset")
if instr(strSQL," ")<1 then strSQL="select top 1 * from "&strSQL
doExec tmpRS,strSQL,1,3
'if not tmpRS.eof Then
tmpRS.addnew
if len(strFields)>0 Then
dim tmpAry,aa
tmpAry=split(strFields,",")
for aa=0 to ubound(tmpAry)
'debug tmpAry(aa)&"-"&opsTest.toVariable(strTree.getItem(tmpAry(aa)),"")&"<br>"
tmpRS(tmpAry(aa))=toFormatValue(strTree.getItem(tmpAry(aa)))
next
else
strTree.doBegin()
for ii=1 to strTree.getCount()
'debug strTree.getItemKey()&"<br>"
tmpRS(strTree.getItemKey())=opsCode.toString(strTree.getItemValue())
strTree.doMove()
next
end if
tmpRS.update
'end if
tmpRS.close
set tmpRS=nothing
end sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询