RSS
热门关键字:
当前位置 :| 主页>web development>

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 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
栏目列表
热点关注
相关文章