Master A Powerful Way To Execute Multiple SQL Commands In Delphi With This Windows Sample
January 22, 2021 by Konstantin Tomov
This sample demonstrates two ways of Для просмотра ссылки Войдиили Зарегистрируйся in an Для просмотра ссылки Войди или Зарегистрируйся.
To this end, the sample implements two ways of handling the errors:
или Зарегистрируйся as follows:
или Зарегистрируйся. Click on any of the buttons to execute the corresponfing error handling technique. Both error handling techniques are implemented as follows:Using handlerThe sample uses the Для просмотра ссылки Войди или Зарегистрируйся event of FDQuery1. This event fires when an error happens while the dataset is communicating with a DBMS. The event checks if the AException parameter is an instance of Для просмотра ссылки Войди или Зарегистрируйся. Then, the sample uses the Для просмотра ссылки Войди или Зарегистрируйся and Для просмотра ссылки Войди или Зарегистрируйся properties of Для просмотра ссылки Войди или Зарегистрируйся to fix the error.Note: After the execution, the property Для просмотра ссылки Войди или Зарегистрируйся of FDQuery1 shows the number of successful executions.Using loopThe sample uses the Для просмотра ссылки Войди или Зарегистрируйся property of the Для просмотра ссылки Войди или Зарегистрируйся class to read Для просмотра ссылки Войди или Зарегистрируйся objects, where each object corresponds to an error, warning, or message returned by a DBMS. This property is used in a loop in order to fix all the errors of the parameters array.
In the link below you will find the original post of the sample, as well as more link to other related information:
Для просмотра ссылки Войдиили Зарегистрируйся
Для просмотра ссылки Войдиили Зарегистрируйся
January 22, 2021 by Konstantin Tomov
This sample demonstrates two ways of Для просмотра ссылки Войди
To this end, the sample implements two ways of handling the errors:
- Implementing an Для просмотра ссылки Войди
или Зарегистрируйся event. - Using the Для просмотра ссылки Войди
или Зарегистрируйся class on a loop.
Location
You can find the BatchErrorHandling sample project at:- Start | Programs | Embarcadero RAD Studio Sydney | Samplesand then navigate to:
- Object PascalDatabaseFireDACSamplesComp LayerTFDQueryExecSQLBatchErrorHandling
- Subversion Repository:
- You can find Delphi code samples in Для просмотра ссылки Войди
или Зарегистрируйся. Search by name into the samples repositories according to your RAD Studio version.
- You can find Delphi code samples in Для просмотра ссылки Войди
How to Use the Sample
- Navigate to the location given above and open BatchErrorHandling.dproj.
- Press F9 or choose Run > Run.
Files
File in Delphi | Contains |
---|---|
BatchErrorHandling.dproj BatchErrorHandling.dpr | The project itself. |
Unit1.pas unit1.fmx | The main form. |
Implementation
Before running the sample, the main components are configured at design time using the Для просмотра ссылки Войди- A Для просмотра ссылки Войди
или Зарегистрируйся object named FDConnection1. This is FireDAC connection object that the sample uses to connect to a DBMS. The sample sets the Для просмотра ссылки Войдиили Зарегистрируйся property to Oracle_Demo. - A Для просмотра ссылки Войди
или Зарегистрируйся object named FDQuery1. This component implements a dataset capable of executing SQL queries. To this end, the sample configures the following properties of the object:- The Для просмотра ссылки Войди
или Зарегистрируйся property is set to FDConnection1 in order to specify the FireDAC connection object. - The Для просмотра ссылки Войди
или Зарегистрируйся property of FDQuery1 is set to insert into batch_demo values id, :name).
- The Для просмотра ссылки Войди
In the link below you will find the original post of the sample, as well as more link to other related information:
Для просмотра ссылки Войди
Для просмотра ссылки Войди