Argument out of range exception in Client.
When you have generated a Server and a client Project. When launching the client, you can "Get" the table content, if you try to refresh the data you will get an Argument out of range exception. Delphi 10.3.1 SQL Server database.
When you get all tables, all tables are checked, but when you have about 300 tables in your database and if you need only 3 tables it's a pain to check only those you don't want. It would ne nice to have a check all/ uncheck all function in the tool. amazing work.
Workaround: If you experience a EArgumentOutOfRangeException copy the Delphi FMX.Grid.Style.pas source file to your project directory and change the two raise lines in the CellRect event to Exit as follows:
function TStyledGrid.CellRect(const ACol, ARow: Integer): TRect; var I, X, Y: Integer; HiddenFound: Boolean; begin if (ACol < 0) or (ACol > ColumnCount) then Exit;//raise EArgumentOutOfRangeException.CreateResFmt(@SInvalidColumnIndex, [ACol]); if (ARow < 0) or (ARow > RowCount) then Exit;//raise EArgumentOutOfRangeException.CreateResFmt(@SInvalidRowIndex, [ARow]);
Thanks for your reply. Unfortunatelly it doesn't solve the problem. I still get the error.
But When I add an exit on this line I have no error :
procedure TMainForm.RefreshTable;
var
I: Integer;
ColumnCount: Integer;
ColumnWidth: Integer;
begin
if Closing then Exit;
--->exit;