In this
window you can enter the name and description for the Database Connection like
also configure the connection.
Select a server name (the default setting is the
local server). If the server does not appear on the drop down list, you
can refresh the list by clicking on the green refresh button.
Click Apply
to save your changes and Close to exit from the connection properties.
Explaining
how to create a SELECT statement for your data source as well as configure
a user-defined parameter.
Clicking the Configure Command button will open the
Configure SELECT Command window.
There are
three type to choose from: Custom query, Table query of a table or view or
Stored Procedure listed.
The command
that is being generated automatically selected all the column from the table.
You can further customize this by adding a user defined parameter. In order to,
add the string to the end of the command or go next. “WHERE City = @City” has
been added as an example.
This new
added parameter will be detected, where you could further configure the data
type an length.
The Test Command button can also be used to indicate the result of select
command.
After you will define a specific city, the query test result will show all the rows with “London” under the City column.
The Data
Selection Schema section will be autofilled based on the setting made in the
Data Selection Command. You can also click on the “Autodetect Schema” button,
which will refresh the existing found data selection. You can also configure
your own schema by clicking on the “add new data” button.
The Data
Refresh tab allows users to set the data refresh type or period for the
configured Data Source. You can choose from No Refresh, Period or By Triggers
as the type, and then further define a time period or a trigger of your wish.
Except simple SELECT statements you can alco integrate INSERT, UPDATE and DELETE queries into your application, both configuration and runtime use.
To enable this options, select designated checkbox
Once you have
applied the changes of this options, you can verify the feature using GraphWorX.
(Using GridWorX Viewer)
Configure
it to show the Categories table. In runtime,
click on the table and you should be able to select the option of
inserting a row.
Create a new subscription:
Insert “Data Entry” above the Table. As DataSource set
the @CustomerID parameter.
Place a normal button next to it and set the command to be Write Value. Set also the data source to be Delete Customers - @@Execute; and the ON Up Value is going to be 1.
Insert the name, press enter to accept the changes and
click the button to delete on of the Customer.
There is a
possibility to create and utilize any Asset so that it is defined as a field in
the database. In the discussed example, the selected Asset will return a
specified value from the database.
In the
"Read Expression" tab, include the code that will be responsible for
the "SELECT" function, meaning it will retrieve a specific value from
the database.