求教怎么修改我的登陆页面
做一个银行转账的模拟系统怎么判断输入的用户名和密码是否正确,以下为代码,求指正,数据库为access,vb.net版本为2012
Public Class Form1
Dim myconn As New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=|data directory|\银行卡.mdb;")
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Cmd As OleDb.OleDbCommand
Dim Rd As OleDb.OleDbDataReader, SQL As String
SQL = "Select 银行卡号,银行卡密码 From 银行卡,银行卡 Where name='" & TextBox1.Text & "' And 银行卡密码='" & TextBox2.Text & "'"
myconn.Open()
Cmd = New OleDb.OleDbCommand(SQL, myconn)
Rd = Cmd.ExecuteReader()
If Rd.Read() Then
Form2.Show()
Me.Hide()
Else
MessageBox.Show("密码或用户名错误!", "错误提示!", MessageBoxButtons.OK, MessageBoxIcon.Error)
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End If
Rd.Close()
myconn.Close()
End Sub
老是 myconn.Open()报错,找不到文件 --------------------编程问答-------------------- 检查下 你的 Data Source 数据源能否取到?
补充:.NET技术 , VB.NET