Product Documentation

FairCom ADO.NET Driver

Previous Topic

Next Topic

Compile Using Microsoft Visual Studio IDE

This section explains the steps to compile and run the tutorials from the Microsoft Visual Studio IDE. FairCom provides Microsoft Visual Studio solutions for Microsoft Visual Studio 2015, Microsoft Visual Studio 2017, and Microsoft Visual Studio 2019. You can find these solutions in the various “Microsoft Visual Studio” directories in the drivers\csharp.sql.ado.net\tutorials\IDEProjects directory. Please choose the one which corresponds to the version of Visual Studio you have installed.

These tutorials require the Microsoft Windows SDK to be installed on your computer. See Microsoft Windows SDK.

  • Before using the solution file, please be sure the prerequisites listed in Compiling Your Projects have been met.
  1. Load the CSharpTutorials.sln file that corresponds to your version of Visual Studio by double-clicking the .sln file.
  2. To build these samples use the Build menu of Visual Studio and pick the Build Solution item:

    error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found…

    A common cause of this compile-time problem is not having the .NET desktop development workload installed as part of Visual Studio. Please make sure you have completed the first prerequisite discussed on the Compiling Your Projects page.

  3. To fully observe how these tutorials interact with FairCom DB, step through the code with the debugger and execute it step by step. To debug step-by-step, use the Step Into item from the Debug menu or simply press F11. Note that you might need to open the C# source code file for Tutorial #1 first, so Visual Studio does not step you through the assembly language.

  4. By default, the Visual Studio debugger will start the CSharpTutorials1 project. When you are finished with the first tutorial, start the other tutorials using the Solution Explorer. Right-click on the next project and select Set as StartUp Project, then step into the code as described above. The Visual Studio debugger will start the new StartUp project.

The output of the first tutorial in the Visual Studio debugger will look like the text below:

INIT

Logon to server...

DEFINE

Open table...

Add fields...

Create table...

MANAGE

Delete records...

Add records...

Display records...

1000 Bryan Williams

1001 Michael Jordan

1002 Joshua Brown

1003 Keyon Dooling

DONE

Close table...

Logout...

Press <ENTER> key to exit . . .

TOCIndex