From Clomosy Docs

Revision as of 08:41, 21 October 2024 by ClomosyManager (talk | contribs)

You will explore the fundamental commands used for database management in the TRObject programming language. Database applications provide many important functions to facilitate data access and management. Commands such as Open, Close, Insert, and Edit interact with data sets, enabling the reading, updating, and addition of new records. Additionally, navigation commands like First, Next, Last, and Prior allow for traversing through data sets and locating specific records. Comprehensive information about the commands you can use when performing database operations is provided.

Open

The result set obtained from a database query is used to open or prepare the data for use. The connection must be active before interacting with the database.

Clomosy.DBSQLServerQuery.Open;

Clomosy.DBSQLiteQuery.Open;

Query1.Open; // Query1 opens the database query.

OpenOrExecute

It is a method used to open or execute a database query. This method automatically opens the query if it is not already open; if it is open, it executes the query.

Clomosy.DBSQLServerQuery.OpenOrExecute;

Clomosy.DBSQLiteQuery.OpenOrExecute;

Query1.OpenOrExecute;

First

It is used to mark the first record in a dataset. This command allows you to navigate to the first record of the dataset when retrieving the query result.

Clomosy.DBSQLServerQuery.First;

Clomosy.DBSQLiteQuery.First;

Query1.First;

Next

It is used to move to the next record in a dataset. This command allows you to navigate to the record following the current record position.

Clomosy.DBSQLServerQuery.Next;

Clomosy.DBSQLiteQuery.Next;

Query1.Next;

Last

It is used to mark the last record in a dataset. This command allows you to navigate to the last record of the dataset when retrieving the query result.

Clomosy.DBSQLServerQuery.Last;

Clomosy.DBSQLiteQuery.Last;

Query1.Last;