Previous Page Trail Contents Next Page

7. Work with database

7.1 Introduction

7.2 Query component

7.3 Data function

7.1 Introduction

This software supports working with databases. The ODBC, Sql Server and Oracle drivers are supported. Working with datases enables us to create arrays of celestial bodies, math functions, statistical selections etc. Database output may be connected to every database consumer. One of this consumer is database iterator. It iterates rows of database table.

7.2 Query component

Database component corresponds to the Database comoponent button. Its property editor is shown below:

Property editor

This component enables us to select a database driver, connect to database and perform SQL query. The result of query may be used for science and engineering purposes. This component have also a diagram query editor. Press the Diagram button to open the editor. Then the following window appear.

Diagram editor

This editor enables to select columns of database tables, link columns and set the "not null", ">", "<" and "=" conditions.

7.3 Data function

The database component may be used for construction of function Data function . Let us consider the following examlple. It is necessary to install sample database to reproduce this example. Creation of sample data function contains the following steps.

Step 1.

Set the database component  Database comoponent and insert connection string:

==========  Connection string =============

user id=sa;data source=localhost;initial catalog=SELECTIONDB;integrated security=SSPI

====================================

and query:

========== Query =====================

SELECT Func.x, Func.y FROM Func ORDER BY Func.i

====================================

Step 2.

Put on desktop the Data function compontent. Link it to the database component by a Data link  link. The picture looks like:

Data function scenario

Step 3.

Open editor of properties of the Data function component and select parameters like it is exhibited on the following picture:

Fuction graph 

Then this function may be used as external function in formula editor. Click here to download this scenario.


Previous Page Trail Contents Next Page