Skip to content

Commit

Permalink
DBTest updated -top switch logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolm-Stewart committed Jul 11, 2024
1 parent 938cee6 commit 3ff087e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion DBTest/DBTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ public static void GenericConnectionTest(IDbConnection cn, IDbDataAdapter da) //
ReportFormatter rf = new ReportFormatter();
rf.SetColumnNames(colNames);

int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : RowsToDisplay;
// int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : RowsToDisplay; // Nug: Array out of bounds exception when RowsToDisplay > dt.Rows.Count
// if RowsToDisplay == -1, display all rows, otherwise display lesser of actual rows and RowsToDisplay
int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : (RowsToDisplay > dt.Rows.Count ? dt.Rows.Count : RowsToDisplay);
for (int r = 0; r < rows2disp; r++)
{
row = dt.Rows[r];
Expand Down
4 changes: 2 additions & 2 deletions DBTest/DBTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1199.0")]
[assembly: AssemblyFileVersion("1.0.1199.0")]
[assembly: AssemblyVersion("1.0.1200.0")]
[assembly: AssemblyFileVersion("1.0.1200.0")]

0 comments on commit 3ff087e

Please sign in to comment.