AutoTablesForRADServer icon indicating copy to clipboard operation
AutoTablesForRADServer copied to clipboard

Argument out of range exception in Client.

Open ads69 opened this issue 6 years ago • 2 comments

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.

ads69 avatar May 06 '19 17:05 ads69

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]);

FMXExpress avatar May 06 '19 17:05 FMXExpress

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;

ads69 avatar May 07 '19 08:05 ads69