Topic: TableGrid1 and EditBox1.Text
Hello MVD Users
I'm testing an SQL query in my application to test if it could short-circuit function CheckDublicate.
In a form I have a tablegrid displaying names of all authors stored in a table called Auteurs.
Above this grid, I put an EditText (with filter set to a%
My wish would be : when I begin to enter a letter, so focus is automatically placed upon first Occurence beginning with letter entered
(i.e when letter A is typed, focus is going on first author with first letter A and so one gradually as next letters are typed.
So here is my attempt to achieve this :
procedure Auteurs_Edit1_OnChange (Sender: string);
begin
Auteurs.TableGrid1.SelectedRow := SQLExecute('SELECT * FROM Auteurs WHERE Auteur = ' + Auteurs.Edit1.Text + '%');
end;
Well, an error message rose singing : 'near "%" syntax error.
I probably made a mistake somewhere
Any idea about reason of such a message ?
Thanks for your help
JB