vb+sql设计的超市管理系统,求大神帮忙解决问题
Private Sub Command1_Click()Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
strsql = "select * From 登录表 Where 用户名= '" & Text1.Text & "'" & "and 密码=" & Text2.Text & "'"
rs.Open strsql, cn
If rs.EOF Then
MsgBox "用户名或密码错了"
Else
From5.Show
Unload Me
End If
End Sub
Private Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "用户名和密码不能为空"
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
strl = "select * Form 登录表 Where 用户名='" & Text1.Text & "'"
rs.Open strl, cn, 1, 3
rs.AddNew
rs("用户名") = Text1.Text
rs("密码") = Text2.Text
rs.Update
MsgBox "注册成功"
End If
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Dim cn As New ADODB.Connection
cn.ConnectionString = "Provider=Micosoft OLE DB Provider for SQL Server;Data Source=E:\SQL\DB\shop_date.mdf"
cn.Open
End Sub
这是源码,但是运行的时候老是说“未找到 提供程序。该程序为正确安装”请问我该怎么改?