Type de données incompatible dans l'expression du critère
Voilaa le code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Credit1.Label30.Text = Label49.Text
Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Hamza.Bens\Documents\Optique MAATA\Optique MAATA\Optique MAATA\bin\Debug\Optiquedtbase.mdb")
Dim sqlcomm As New OleDbCommand
Try
con.Open()
sqlcomm.Connection = con
sqlcomm.CommandText = "SELECT Nom FROM Client where N°Dossier= '" & numero.Text & "'"
TextBox2.Text = sqlcomm.ExecuteScalar("Nom")
con.Close()
Catch ex As Exception
MsgBox("Erreur!! Database" & ex.Source & ": " & ex.Message, MsgBoxStyle.Exclamation)
End Try
Credit1.ShowDialog()
End Sub |