I have 3 MyTable, related between then,
In the 3rd table i'm inserting some data, i want that the field "IDTempo" only have 40 values, and that they appear in order. The problem is that when i insert the first value, it goes to the last place on the table and remains there. When i insert the other values they always go to the second last position. Thank you for the help.
Best regards
Code: Select all
//Vai buscar o último tempo inserido
TIR500Tempos->Last();
int IDtempo = TIR500Tempos->FieldByName("IDTempo")->AsInteger;
if(IDtempo > 40){
MessageDlg(LoadMsg(555), mtError, TMsgDlgButtons() Insert();
TIR500Tempos->FieldByName("IDTempo")->AsInteger = IDtempo;
TIR500Tempos->FieldByName("Clip")->AsString = Clip;
TIR500Tempos->FieldByName("Tempo")->AsInteger = Tempo;
TIR500Tempos->Post();