AZMY
Thinkware, Inc
General Order FormSupport CenterSearch this web siteAbout Azmy

 

DM API Examples

 

Building and running the Examples

1. Create a Folder and download the DMAPI.zip to your PC.

2. Unzip DMAPI.zip file to the folder you created.

3. Two folders will be created: dist and Examples. Folder dist contains two run-time Dynamic Link Libraries: sqdd.dll and sqdx.dll and two link-time libraries: sqdd.lib and sqdx.lib, and sqddImport.h file used for the C++ projects.  Folder Examples contains three folders for all examples, and a folder data contains text data samples: EX3DATA.TXT and sales.txt to use for the examples and an SQSETUP.INI file that you can use as a tune up for the Fact Engine (you will be prompt to enter 

3. Run Microsoft Visual Studio .Net and open solution "DMAPI Examples.sln".

4. DMAPI Examples solution contains 6 projects: C++ console, VC++, C# console, C# WinForms, VB.Net Console, and VB.Net winForms.

5. Select the project you want to run and set it as the Startup project, using the Project Menu.

Console Example:

When you run the console example the system asks you to enter the path for the text data file, and then asks for the complete path for the text file to where you want to write the facts. Finally optionally you can enter the setup.ini file that contains fine tune ups to the engine.

When the engine starts it will invoke the ReadProgress where it writes “.” For 100 row the system reads, then as the engine is running it writes “-“ as it invokes the RunProgress Function.

 

WinForm Example:

Consists of four examples:

Example1: You can browse for the data file, specify where to write the discovered facts and optionally to select the engine setup file. When you press the run button the system calls the SQEngine( DataFile, FactFile, SetupFile ), which reads the data, runs the engine and writes the facts to the text file.

 

Example2: When you click on the Read Data button, you will browse for the text data file then the system will call the SQReadTextData function. After reading the data, you can press the Run Engine button where you can apply additional set ups to the engine. When you click the Run button the system will call the SQRun( IfCloumn, ThenColumn, SetupFile ), start the engine and to discover all possible facts. After the engine discovers facts, you can write them to a file.

Example3: When you press the test the system will read the EX3DATA.TXT file in the data folder, call SQAddColumn to add columns, SQPreAllocate to allocate the number of rows to the table, then add the data using SQAddData

 

Example4: In this example we use ODBC to read MS Access data instead.

To use this example, create a DSN called NorthWind using the ODBC Data Source Administrator, to point to the MS Access NorthWind. Please study the connection statement and feel free to change the SQL Select Statement. When you click the Read data button the system will call the SQReadODBCData, and then click on the Facts to run the engine.

 

 

Copyright © 1996 - 2007 AZMY Thinkware Inc. All rights reserved.