'//数据库链接
SqlConnString="Provider=SQLOLEDB;Server=192.168.3.1;Database=useran;UID=useran;PWD=userpassword"
Set Conn = CreateObject("ADODB.Connection")
Conn.open SqlConnString
Set myRst = CreateObject("ADODB.Recordset")
'//得到还没有处理的记录
Strsql = "select count(*) from acou"
myRst.Open Strsql,Conn,0,1
If Not myRst.EOF Then msgbox("打开数据库成功,共计有" & myRst(0) & "条记录")
myRst.close
set myRst = nothing
Conn.close
set Conn = nothing
阅读(586) | 评论(0) | 转发(0) |