salut j'ai crée un datagrid + un champ texte
pour afficher des donner selon un critère qui ce trouve dans le champ texte txtHT_CODE quand j'exécute la requête le datagrid n'affiche rien comme si 'il n'y avait pas d'enregistrement avec ce critere


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
Dim sql As String
 
If DataEnvironment1.rsCommand1.State <> 0 Then
DataEnvironment1.rsCommand1.Close
End If
 
sql = "SELECT * FROM CLIENT WHERE HT_CODE like'" & txtHT_CODE.Text & "%'"
 
DataEnvironment1.rsCommand1.Open sql
 
Set grid.DataSource = DataEnvironment1.rsCommand1
grid.Refresh