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")
If RsWorkUserInfo.State = 1 Then RsWorkUserInfo.Close End If RsWorkUserInfo.Open StrSql,Conn,1,3
IF Not RsWorkUserInfo.Eof Then RsWorkUserInfo("LoginName") = LoginName RsWorkUserInfo("UserName") = UserName RsWorkUserInfo("Password") = Md5(Password) RsWorkUserInfo.Update Update = True Else Update = False End if
大家在书写asp程序时,最担心的可能就是数据库的连接信息,会被一些人看到,进行一些破坏。下面我们用vb6.0来做一个动态链接库(.dll)来隐藏数据库的连接信息。 启动vb6.0,新建--Active dll工程。单击"工程"--引用,选择"microsoft active server pages object library" 和"...
编写的把文件的内容写入到数据库的代码如下 首先 建立 数据库表 id char data image(注意此处不要用text类型 text类型与binary不兼容) 代码如下: import java.io.*; import java.sql.*; public class Db { public static void main(String[] args) { Db ac = new Db(); String blobname = "D:\\test1.txt"; //blob...