asp command語句裡的兩個sql

| |
[不指定 2008/04/09 10:09 | by Else ]
[codes=vb]
'刪除回復貼
If (Request.querystring("del")="ok") Then
  '刪除權限,用來觸發ajax的error
  if session("bbsadmin")=1 then
    dim delrs
    Set MM_delCmd = Server.CreateObject ("ADODB.Command")
    MM_delCmd.ActiveConnection = MM_conn_STRING
  
    SelectSQL = "Select * from bbs WHERE id ="&Request.form("id")
    MM_delCmd.CommandText =SelectSQL
    MM_delCmd.Prepared = true
    set delrs = MM_delCmd.Execute
    if delrs.Fields.Item("cc").Value<>"" then
      DeleteFile(server.MapPath("../obj/"&delrs.Fields.Item("cc").Value))
    end if
    MM_delCmd.CommandText = "DELETE FROM bbs WHERE id ="&Request.form("id")&""
    MM_delCmd.Prepared = true
    MM_delCmd.Execute
    MM_delCmd.ActiveConnection.Close
    response.Write("刪除成功")
    response.End()
  end if
End If  
[/codes]這個是刪除的,我試了一個insert into 和一個update set 這個就不行了!

作者:Else 's Blog
地址:http://www.aixq.com/post/986/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
  • 中查看更多“asp command語句裡的兩個sql”相关内容
  • 中查看更多“asp command語句裡的兩個sql”相关内容
  • 中查看更多“asp command語句裡的兩個sql”相关内容
  • 中查看更多“asp command語句裡的兩個sql”相关内容
  • 中查看更多“asp command語句裡的兩個sql”相关内容
  • 中查看更多“asp command語句裡的兩個sql”相关内容

  • 最后编辑: Else 编辑于2008/04/10 14:15
    Tags: ,
    代码 程序 编程 | 评论(0) | 引用(0) | 阅读(3776)
    发表评论
    表情
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]
                   

    验证码 不区分大小写