|
我没用他前台的javascript,是直接交的
'批量删除数据的函数
'参数:
'DelStr上一个网页提交过来的Request.Form("selAStr")
'Field条件字段名称
'FType条件字段是文本型还是字符串型
'TBName删除数据的表名
'conn数据库连接对象(ADODB.Connection)
sub VerifyDelStr(DelStr,Field,FType,TBName,conn)
Dim DelAry
Dim i
Dim WheSql
Dim tSql
tSql="Delete * From "&TBName&" Where "
WheSql=""
DelAry=Split(DelStr,",")
For i=0 To UBound(DelAry)-1
Select Case FType
Case "text"
WheSql=WheSql&Field&"='"&DelAry(i)&"'|"
Case "number"
WheSql=WheSqlField&"="&DelAry(i)&"|"
End Select
Next
WheSql=mid(WheSql,1,Len(WheSql)-1)
WheSql=Replace(WheSql,"|"," Or ")
conn.Execute(tSql&WheSql)
End sub
call VerifyDelStr(del_str,"id","number",p_news,conn)
Microsoft VBScript 运行时错误 (0x800A0005)
无效的过程调用或参数: 'mid' |
|