Till Database Module

Till Database Module is a system module, that is used for handling database (DB) activities.

Module:

mssqldb

Properties:

Functions:

This module handles only MS-SQL databases. In the reference there is a directory “/system modules/database” with extensive code examples that demonstrate how to construct and work with databases. In the demonstration, we setup a database “geodb” and build sample tables (directory “setup”), then, multiple queries are run and the results are analyzed and shown.

Program from reference “/database/ms sql/setup/geodb.create.till” that demonstrate how to create database “geodb”:

Program from reference “/database/ms sql/single/database.connect.single.till” that demonstrate how to construct the module and connect to DB:

Program from reference “/database/ms sql/single/database.value.single.till” that demonstrate how to get value from DB:

Function “value” gets the query and returns one value.

Program from reference “/database/ms sql/single/database.list.single.till” that demonstrate how to get list of values from DB:

List variable “names” get result of querying the DB for list of names.

Program from reference “/database/ms sql/single/database.all.single.till” that demonstrate how to get list of rows from DB and analyze the result:

List “countries” will have records that hold query result data. Each record will hold result row items where the keys are the column names and the values are the respective result values. For analyzing the results, we implement a looping, where each item (row) of “countries” is relayed to a row record “c” that have the expected column names as keys.