C++Builder 5.02 / Windows XP
TMS Software (DBAdvGrid) to display a query (PobMod->PobQuery1)
Tables
(T_COMPANY fields: C_CODE, C_COMPANY)
(T_EMPLOYEE fields: C_CODE, E_ID, E_NAME,...................
.....)
(T_ROOM fields C_CODE, E_ID, R_ROOM,.....)
The query is sorted by (SQL -> ".....ORDER BY T_company.C_CODE, T_employee)
I have a boolean field to indicate if the person is on board or if he is at home
The grid, just now displays all the results and another information like the row number and the record number
The results for the query related to the persons on board are not more than 115 (that is the total capacity of this ship) In the other hand the people moving around could be up to 300
As you can see it is not a big deal
I am using Borland Visual dBase 7.5 to create the tables and the query
I am looking how to filter the query result to display on the grid the following
1.- All the results
2.- The results filtered by the field C_CODE and/or C_COMPANY. So the user has the option to see only the personnel for a company at a time in the dbgrid
Only for personnel on board, so the field E_ONBOARD is checked (true)
3.- All the results when E_ONBOARD is unchecked
4.- The above filtered by C_CODE or C_COMPANY
This is my first project on C++Builder and I am trying to create an application for a personal use and solve a lot of paperwork now keep it in another lot of folders created around the PC
Thanks to Kode99 I was able to go a step forward and I found another problem
My code is
void_fastcall TForm1::Button1Click(TObje
ct *Sender)
{
PobMod->PobQuery1->Close()
;
PobMod->PobQuery1C_CODE->A
sString = Edit1->Text;
PobMod->PobQuery1->Open();
}
The result is
" Project Project1.exe raised exception class EDatabaseError with message 'PobQuery1: Dataset not in edit or insert mode'. Process stopped. Use Step or Run to continue"
Well before I couldn't get anything, this one doesn't look so bad.
How to keep the dataset in edit or insert mode?
Start Free Trial