HI I have vb.net with ms access database application.
I want to create log in form
Here is my code but when enter the details and hit Login button it says"datatype mismatch error"

Dim con As New OleDbConnection
        Dim cmd As New OleDbCommand
        Dim rd As OleDbDataReader
        con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\data\Histopathology New.accdb"
        cmd.Connection = con
        con.Open()
        cmd.CommandText = "select login, password from autho where login= '" & TextBox1.Text & "' and password= '" & TextBox2.Text & "'"
        rd = cmd.ExecuteReader()
        If rd.HasRows Then
            Welcome.Show()
        Else
            MsgBox("Invaid")
        End If

why not use

cmd.CommandText = "select from autho where login= '" & TextBox1.Text & "' and password= '" & TextBox2.Text & "'"

just like that.

This question has already been answered. Start a new discussion instead.