I keep getting this error each time : "Data type mismatch in criteria expression."

40 views Asked by At
Private Sub Btn_Rechercher_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Rechercher.Click
        Dim mycommand As New OleDbCommand()
        mycommand.CommandText = "SELECT * FROM Patient WHERE CIN_Patient=" & Me.CIN_Txt.Text
        mycommand.Connection = myconnexion
        Dim myDataAdapter As New OleDbDataAdapter(mycommand)
        Dim myDataSet As New DataSet()
        myDataAdapter.Fill(myDataSet, "Patient")
        DataGridView1.DataSource = myDataSet.Tables("Patient").NewRow()
    End Sub

They told me that it might be the type is mismatching, but still didn't get it!

0

There are 0 answers