于sql的连接问题
sdgqx 2003-08-19 03:13:52 Dim uid, pwd As String
Dim cn As ADODB.Connection
uid = txtUser.Text
pwd = txtPwd.Text
If uid <> "" Or pwd <> "" Then
cn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;" & "User ID=" & uid & ";password=" & pwd & ";Data Source=(local);Initial Catalog=telphone"
cn.Open
MsgBox "登錄成功", vbOKOnly
ConnectString = cn.ConnectionString
cn.Close
Unload Me
Else
MsgBox "用戶名或密碼不能為空!", vbInformation, "錯誤"
txtUser.SetFocus
End If
为什么老出错