|
ASP快速开发方法之数据操作(6) Class DataTable dim tempvalue public Function DeldataSql(tableName,DelField,id) If tableName<>"" and id<>"" then sql="delete from "&tableName If isnumeric(id) and instr(id,",")=0 then sql = sql & " where "&DelField&" = "&id Else sql = sql & " where "&DelField&" in ("& id &")" End If Opendatabase conn.execute(sql) Closedatabase tempvalue=true Else tempvalue=false End If DeldataSql=tempvalue End Function End Class %>
以下是我的sql.asp文件,请自己进行增删
<% '用于查询数据 Class DataTable '查出记录 public Function SelectData(sql) If sql<>"" then opendatabase Rs.open sql,conn,1,1
|