Skip to content

Commit 9d40add

Browse files
2 parents 615cf9c + 4a06910 commit 9d40add

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

DBTest/DBTest/DBTest.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@
1111
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<Deterministic>true</Deterministic>
14+
<IsWebBootstrapper>false</IsWebBootstrapper>
15+
<PublishUrl>publish\</PublishUrl>
16+
<Install>true</Install>
17+
<InstallFrom>Disk</InstallFrom>
18+
<UpdateEnabled>false</UpdateEnabled>
19+
<UpdateMode>Foreground</UpdateMode>
20+
<UpdateInterval>7</UpdateInterval>
21+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
22+
<UpdatePeriodically>false</UpdatePeriodically>
23+
<UpdateRequired>false</UpdateRequired>
24+
<MapFileExtensions>true</MapFileExtensions>
25+
<ApplicationRevision>0</ApplicationRevision>
26+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
27+
<UseApplicationTrust>false</UseApplicationTrust>
28+
<BootstrapperEnabled>true</BootstrapperEnabled>
1429
</PropertyGroup>
1530
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1631
<PlatformTarget>x64</PlatformTarget>
@@ -45,5 +60,12 @@
4560
<ItemGroup>
4661
<None Include="App.config" />
4762
</ItemGroup>
63+
<ItemGroup>
64+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
65+
<Visible>False</Visible>
66+
<ProductName>.NET Framework 3.5 SP1</ProductName>
67+
<Install>false</Install>
68+
</BootstrapperPackage>
69+
</ItemGroup>
4870
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4971
</Project>

DBTest/DBTest/Program.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Program
3636
static string CursorType = "FIREHOSE"; // FIREHOSE, DATASET, NONE (executing a non-row-returning command)
3737

3838

39-
static void Main(string[] args)
39+
static int Main(string[] args)
4040
{
4141
//
4242
// Set command-line rules and parse the command-line
@@ -59,7 +59,7 @@ static void Main(string[] args)
5959
{
6060
Console.WriteLine("Bad arguments: " + ruleViolation);
6161
displayUsage();
62-
return; // exit the application
62+
return (-1); // exit the application // Clintonw
6363
}
6464
else // for case-insensitive argument names, use lower-case to match
6565
{
@@ -71,7 +71,7 @@ static void Main(string[] args)
7171
{
7272
Console.WriteLine("The provider type must be SqlClient, ODBC, or OLEDB.");
7373
displayUsage();
74-
return;
74+
return (-1);
7575
}
7676
ConnectionString = cp.GetArgOrBlank("connect"); // argument is required
7777
CommandString = cp.GetArgOrBlank("command"); // argument is optional
@@ -80,35 +80,35 @@ static void Main(string[] args)
8080
{
8181
Console.WriteLine("The timeout vaue must be numeric and 0 or higher.");
8282
displayUsage();
83-
return;
83+
return (-1);
8484
}
8585
CursorType = cp.GetArgOrBlank("cursor", "Firehose").ToUpper(); // argument is optional with a default value
8686
if (CursorType != "FIREHOSE" && CursorType != "DATASET" && CursorType != "NONE")
8787
{
8888
Console.WriteLine("The cursor type must be FireHose, DataSet, or None.");
8989
displayUsage();
90-
return;
90+
return (-1);
9191
}
9292
value = cp.GetArgOrBlank("top", "10"); // argument is optional with a default value
9393
if (int.TryParse(value, out RowsToDisplay) == false || RowsToDisplay < -1)
9494
{
9595
Console.WriteLine("The top vaue must be numeric and -1 or higher.");
9696
displayUsage();
97-
return;
97+
return (-1);
9898
}
9999
value = cp.GetArgOrBlank("repeat", "1"); // argument is optional with a default value
100100
if (int.TryParse(value, out RepeatCount) == false || RepeatCount < 1)
101101
{
102102
Console.WriteLine("The repeat vaue must be numeric and 1 or higher.");
103103
displayUsage();
104-
return;
104+
return (-1);
105105
}
106106
value = cp.GetArgOrBlank("delay", "1"); // argument is optional with a default value
107107
if (int.TryParse(value, out DelaySec) == false || DelaySec < 1)
108108
{
109109
Console.WriteLine("The delay vaue must be numeric and 1 or higher.");
110110
displayUsage();
111-
return;
111+
return (-1);
112112
}
113113
values = cp.GetArgs("stoponerror");
114114
if (values.Count != 0) StopOnError = true;
@@ -159,9 +159,10 @@ static void Main(string[] args)
159159
{
160160
if (i > 0) System.Threading.Thread.Sleep(DelaySec * 1000);
161161
bool success = DatabaseTest();
162-
if (!success && StopOnError) break;
162+
if (!success && StopOnError) return (-2); // break clintonw
163163
}
164164
Console.WriteLine("All Tests Complete.");
165+
return 0; // clintonw
165166
}
166167

167168
static public void displayUsage()

DBTest/DBTest/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Microsoft: CSS SQL Networking Team")]
1212
[assembly: AssemblyProduct("DBTEST.EXE")]
13-
[assembly: AssemblyCopyright("Copyright © 2021")]
13+
[assembly: AssemblyCopyright("Copyright © 2021, 2022")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -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.1198.0")]
36-
[assembly: AssemblyFileVersion("1.0.1198.0")]
35+
[assembly: AssemblyVersion("1.0.1199.0")]
36+
[assembly: AssemblyFileVersion("1.0.1199.0")]

0 commit comments

Comments
 (0)