Product Documentation

FairCom ADO.NET Driver

Previous Topic

Next Topic

Sample Database

To demonstrate the FairCom DB ADO.NET Data Provider, we will prime our database with sample data. To make this easy, we will use the FairCom DB SQL Explorer tool.

Before following these steps, be sure the FairCom Database Engine is installed (see Setting up the FairCom Database Engine) and running (see Starting the FairCom Database Engine).

  1. Launch the FairCom DB SQL Explorer: You may launch the FairCom DB SQL Explorer tool from the Windows Start Menu: All Programs > FairCom > Tools (the exact menu position may vary). If you installed c-tree from a ZIP file, you can find SQL Explorer in <FairCom-Folder>\tools\gui\c-treeSqlExplorer.exe

    The initial FairCom DB SQL Explorer connection screen appears as below, with all the necessary (default) input fields filled in. The password for the 'admin' user is: ADMIN (all upper case - the password is case-sensitive but the user name is not).

    ADO.NET Visual Tutorial SQL Mgr First Screen

    Click OK. You should see the following "Connection Info" dialog. Click OK again.

    ADO.NET Visual Tutorial SQL Mgr ConnectInfo

    Click the Scripts tab, and then click the Load icon from the toolbar as shown here:

    ADO.NET Visual Tutorial Load SQL Script

    A window will appear so you can navigate to the drivers\csharp.sql.ado.net\tutorials directory and select the VisualTutorial1.sql script.

    ADO.NET Visual Tutorial Load SQL Script3

  2. Click the Run button. The SQL script will execute.

    You will notice lines saying “Statement correctly executed”, “0 record(s) deleted”, “1 record(s) inserted”, etc.

    You should now see a screen showing the four records we just added to a table named "custmast":

    ADO.NET Visual Tutorial Run SQL Script

  3. Now that we have our tables populated with data, you may exit FairCom DB SQL Explorer and proceed to the Microsoft Visual Studio programming IDE, and demonstrate the FairCom DB ADO.NET Data Provider Data Source and the ADO.NET Framework Alternate Approach.

TOCIndex