asp+|数据|数据库放松生活网(Relaxlife.net)Asp+Sql 个人总结对数据库的各种操作
/**********************************************************************
*
* 1,---------Asp+Sql 个人总结对数据库的各种操作
*
* 如果需要更多代码,请到:http://www.relaxlife.net 感觉好帮我顶!
*
*
*********************************************************************/
<%
//查询方法
//----------------------------(1)-------------------------------
Set RsWorkUserInfo = Server.CreateObject("ADODB.RecordSet")
StrSql = "Select UsersId, LoginName, UserName, Password"
StrSql = StrSql & " From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
If RsWorkUserInfo.State = 1 Then
RsWorkUserInfo.Close
End If
RsWorkUserInfo.Open StrSql,Conn,1,1
If Not RsWorkUserInfo.Eof Then
LoginName = RsWorkUserInfo("LoginName")
UserName = RsWorkUserInfo("UserName")
Password = RsWorkUserInfo("Password")
End if
RsWorkUserInfo.Close
Set RsWorkUserInfo = Nothing
//----------------------------(2)-------------------------------
StrSql = "Select UsersId, LoginName, UserName, Password"
StrSql = StrSql & " From Users"
StrSql = StrSql & " Where UsersId=" & SqlStr(tUserID)
Set RsFind = Conn.Execute(StrSql)
If Not RsFind.Eof Then
LoginName = RsFind("LoginName")
UserName = RsFind("UserName")
Password = RsFind("Password")
End if
RsFind.Close
Set RsFind = Nothing
//修改方法
//----------------------------(1)-------------------------------
Set RsWorkUserInfo = Server.CreateObject("ADODB.RecordSet")
&nbs
Asp+Sql 个人总结对数据库的各种操作
80酷酷网 80kuku.com