我每次都会收到这个错误:“条件表达式中的数据类型不匹配。”

问题描述 投票:0回答:0
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

他们告诉我可能是类型不匹配,但还是没听懂!

vba vb.net vb.net-2010
© www.soinside.com 2019 - 2024. All rights reserved.