Asp creates the function of Sql statement automatically according to expressing
来源:
作者:Stand originally
时间:2008-12-21
Tag:
点击:
End Function
'==============Parameter explains=================
' this Function returns the Sql statement that updates data
' just updates a condition is not to pass Form to refer those who come over for instance Session
'conditions is updated condition
'numStr causes the field that come to do not need to use only quote, comma (is used between the field, ) break up, did not replace with "" please
'======================================
Function UpdateStr2(objForm, tbName, conditions, numStr)Dim SetFieldVal()I=0For Each ObjItem In ObjFormRedim Preserve SetFieldVal(i)NumPos=instr(numStr, objItem)If NumPos<>0 ThenSetFieldVal(i)=objItem&"=" &trim(replace(objForm(objItem) , "'" , ElseSetFieldVal(i)=objItem&"='" &trim(replace(objForm(objItem) , "'" , &"' "End IfI=i 1NextUpdateStr2= "update " &tbName&"Set " &join(setFieldVal, ", &"Where " &conditions
End Function
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论

