From Clomosy Docs
(Created page with "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...") |
No edit summary |
||
| Line 6: | Line 6: | ||
<pre> | <pre> | ||
Clomosy.DBSQLServerQuery.Open; | Clomosy.DBSQLServerQuery.Open; | ||
Clomosy.DBSQLiteQuery.Open; | |||
Query1.Open; // Query1 opens the database query. | Query1.Open; // Query1 opens the database query. | ||
| Line 11: | Line 13: | ||
<h2> OpenOrExecute </h2> | <h2> OpenOrExecute </h2> | ||
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. | 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.<br> | ||
<pre> | |||
Clomosy.DBSQLServerQuery.OpenOrExecute; | |||
Clomosy.DBSQLiteQuery.OpenOrExecute; | |||
Query1.OpenOrExecute; | |||
</pre> | |||
<h2> First </h2> | |||
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.<br> | |||
<pre> | |||
Clomosy.DBSQLServerQuery.First; | |||
Clomosy.DBSQLiteQuery.First; | |||
Query1.First; | |||
</pre> | |||
<h2> Next </h2> | |||
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.<br> | |||
<pre> | |||
Clomosy.DBSQLServerQuery.Next; | |||
Clomosy.DBSQLiteQuery.Next; | |||
Query1.Next; | |||
</pre> | |||
<h2> Last </h2> | |||
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.<br> | |||
<pre> | <pre> | ||
Clomosy.DBSQLServerQuery.Last; | |||
Clomosy.DBSQLiteQuery.Last; | |||
Query1.Last; | |||
</pre> | </pre> | ||
Revision as of 08:41, 21 October 2024
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;