Answer the question
In order to leave comments, you need to log in
How to correctly implement search in DBGrid through LabelEdit1 in C++ Builder?
There are 2 tables, the column structure is attached in the screenshots
. I'm trying to implement a search through LabelEdit1 on the KeyPress event as follows:
if (N12->Checked==true) {
ADOQuery1->Close();
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add ("SELECT a.familia, c.kolichestvo, c.ch, c.mes, c.god FROM sotrudnik a, main c WHERE a.familia LIKE '%" + LabledEdit1->Text + "%' ORDER BY a.familia;");
ADOQuery1->Open();
gridM(); //класс для обновления столбцов в dbgrid
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question