Skip to content

Commit 3ff087e

Browse files
DBTest updated -top switch logic error
1 parent 938cee6 commit 3ff087e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DBTest/DBTest/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ public static void GenericConnectionTest(IDbConnection cn, IDbDataAdapter da) //
303303
ReportFormatter rf = new ReportFormatter();
304304
rf.SetColumnNames(colNames);
305305

306-
int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : RowsToDisplay;
306+
// int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : RowsToDisplay; // Nug: Array out of bounds exception when RowsToDisplay > dt.Rows.Count
307+
// if RowsToDisplay == -1, display all rows, otherwise display lesser of actual rows and RowsToDisplay
308+
int rows2disp = RowsToDisplay == -1 ? dt.Rows.Count : (RowsToDisplay > dt.Rows.Count ? dt.Rows.Count : RowsToDisplay);
307309
for (int r = 0; r < rows2disp; r++)
308310
{
309311
row = dt.Rows[r];

DBTest/DBTest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.1199.0")]
36-
[assembly: AssemblyFileVersion("1.0.1199.0")]
35+
[assembly: AssemblyVersion("1.0.1200.0")]
36+
[assembly: AssemblyFileVersion("1.0.1200.0")]

0 commit comments

Comments
 (0)