Dim sql1 As new SQLCommand
Dim rq As Date
sql1.C
sql1.CommandText = "se/ect getdate()" \'获取SQL服务器时间
rq = sql1.ExecuteScalar
Dim sql2 As new SQLCommand
Dim log As DataTable
sql2.C
sql2.CommandText = "se/ect * from {loginlog}" \'登录日志表导入
log = sql2.ExecuteReader(True)
Dim yhh As DataRow \'用户行,用来查找状态行
yhh = log.Find("UserID = \'" & User.Name & "\' and Status = \'1\'")
If yhh IsNot Nothing Then \'如果没有这一行,可能会出现找不到相应的行出现错误
yhh("Refreshtime") = rq
log.Save()
End If