水果笔画图片大全:求教vb--ADO问题(求State属性详解)

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 06:15:45
constr = "driver={sql server};server=(local);uid=" & Trim(Text1.Text) & ";password=" & Trim(txtpsw.Text) & ";database=master"
con.ConnectionString = constr
con.Open
If con.State = 2 Then
MsgBox "连接数据库失败", vbOKOnly, "提示"
con.Close
Else

去看MSDN,里面有