There is a query like:

SELECT t1.id_employees, t1.fio_employees, t2.title_post, t1.date_employees FROM employees t1 INNER JOIN post t2 ON t1.post_id_employees = t2.id_post 

Using ADOQuery I fill the grid with the specified columns from this query. At the same time, I need to get from the employees table the contents of the post_id_employees column, which is not in this query in order to put its values ​​into the array. Actually, this is the problem: I don’t know how I can get this column so that while the query is running, it does not appear in the grid, but simply enrolls into the array and that's it.

The only thing that comes to mind is initially, before calling and opening the form, programmatically execute the query, fill the array, then clear the ADOQuery and write a second query to it - the one above, in order to fill the grid and continue to work with this ADOQuery .

If that, originally this sql query is written in the SQL property of the ADOQuery component, and not in the code. I try to fill the array like this:

 id_client_array[ADOQuery5->RecordCount]; arr_copy[ADOQuery5->RecordCount]; for(int i = 0; i < ADOQuery5->RecordCount; i++) { ComboBox4->Items->Add(ADOQuery5->FieldValues["fio_employees"]); ComboBox5->Items->Add(ADOQuery5->FieldValues["title_post"]); id_client_array[i] = ADOQuery5->FieldValues["id_employees"]; arr_copy[i] = ADOQuery5->FieldValues["post_id_employees"]; //На этом месте ошибка, пишет, что этот столбец отсутствует в ADOQuery ADOQuery5->Next(); } 

    0