Asp与Sql构建网站系统中对数据库的各种操作的函数代码分享
作者: 来源: 发布时间:2011-6-24 15:31:53 点击:
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)
%>
[收藏此文章]