Asp與Sql構(gòu)建網(wǎng)站系統(tǒng)中對(duì)數(shù)據(jù)庫(kù)的各種操作的函數(shù)代碼分享
作者: 來(lái)源: 發(fā)布時(shí)間:2011-6-24 15:31:53 點(diǎn)擊:
StrSql = "Insert Into Users(UsersId, LoginName, UserName, Password)"
StrSql = StrSql & " Values(" & SqlStr(tUserID) & "," & SqlStr(LoginName) & "," & SqlStr(UserName) & "," & SqlStr(Password) & ")"
Conn.Execute(StrSql)
'//刪除方法
'//----------------------------(1)-------------------------------
Set RsWorkUserInfo = Server.CreateObject("ADODB.RecordSet")
StrSql = "Delete From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
If RsWorkUserInfo.State = 1 Then
RsWorkUserInfo.Close
End If
RsWorkUserInfo.Open StrSql,Conn,1,3
RsWorkUserInfo.Close
Set RsWorkUserInfo = Nothing
'//----------------------------(2)-------------------------------
StrSql = "Delete From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
Conn.Execute(StrSql)
%>
StrSql = StrSql & " Values(" & SqlStr(tUserID) & "," & SqlStr(LoginName) & "," & SqlStr(UserName) & "," & SqlStr(Password) & ")"
Conn.Execute(StrSql)
'//刪除方法
'//----------------------------(1)-------------------------------
Set RsWorkUserInfo = Server.CreateObject("ADODB.RecordSet")
StrSql = "Delete From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
If RsWorkUserInfo.State = 1 Then
RsWorkUserInfo.Close
End If
RsWorkUserInfo.Open StrSql,Conn,1,3
RsWorkUserInfo.Close
Set RsWorkUserInfo = Nothing
'//----------------------------(2)-------------------------------
StrSql = "Delete From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
Conn.Execute(StrSql)
%>
上一篇:ASP與SQL數(shù)據(jù)庫(kù)連接代碼(包含四種寫法) 下一篇: ASP生成靜態(tài)網(wǎng)頁(yè)中實(shí)現(xiàn)閱讀次數(shù)的程序?qū)嵗a分享
[收藏此文章]