Bonjour
J'ai écrit une simple requête qui verifie si un string existe dans une table
Le bug la fonction ne sait pas différencier entre lettre majuscule et minuscule pourquoi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Public Function IsPlayerExist(ByVal FamillyName As String) As Boolean Dim command As New OleDbCommand command.Connection = Connection command.CommandText = "SELECT Playercode FROM Player WHERE Name = [name?] ;" command.Parameters.Add("name?", OleDbType.VarChar).Value = FamillyName Try Return Convert.ToBoolean(command.ExecuteScalar()) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Function
ex si la table contient vincent et que j'appelle IsPlayerExist("Vincent") rend true !!
Merci
Partager