This shows you the differences between two versions of the page.
database_adaptor [2024/12/05 16:00] montse [Functions] |
database_adaptor [2025/04/03 13:57] (current) ale |
||
---|---|---|---|
Line 8: | Line 8: | ||
===== Initialization Parameters ===== | ===== Initialization Parameters ===== | ||
- | * **DbType:** Indicates the provider or type of database to which we want to connect. | + | * **DbType:** indicates the provider or type of database to which we want to connect. |
- | * **Host:** Represents the IP address or the machine's DNS name where the database resides. | + | * **Host:** represents the IP address or the machine's DNS name where the database resides. |
- | * **Port:** The port number that listens for incoming connections to the database. | + | * **Port:** the port number that listens for incoming connections to the database. |
- | * **Ssl:** When we check the checkbox, the security protocol is activated. | + | * **Ssl:** when we check the checkbox, the security protocol is activated. |
- | * **DbName:** Name of the instance or database service. | + | * **DbName:** name of the instance or database service. |
- | * **User:** User name. | + | * **User:** user name. |
- | * **Password:** User password. | + | * **Password:** user password. |
===== Functions ===== | ===== Functions ===== | ||
Line 22: | Line 22: | ||
* **dBExecuteStatement(Statement):** executes the SQL that it's contain in the parameter (statement). Allows the user to modify the data in the destination database. This function allows you to write SQL statements like Insert, Delete, Update and Merge in the statement parameter. The function will replace the variables for their values in the execution time, that will return a TastInteger with the number of rows that were changed. (Input parameter: The sentence for example:” INSERT INTO x (a, b, c) VALUES (d, e, f)” Output parameter: Integer with the results). | * **dBExecuteStatement(Statement):** executes the SQL that it's contain in the parameter (statement). Allows the user to modify the data in the destination database. This function allows you to write SQL statements like Insert, Delete, Update and Merge in the statement parameter. The function will replace the variables for their values in the execution time, that will return a TastInteger with the number of rows that were changed. (Input parameter: The sentence for example:” INSERT INTO x (a, b, c) VALUES (d, e, f)” Output parameter: Integer with the results). | ||
- | * **dBExecuteStatementFromFile:** executes the statements found in the file whose path is defined in the PathToFileWithStatements parameter. | + | * **dBExecuteStatementFromFile:** executes the statements found in the file whose path is defined in the PathToFileWithStatements parameter. Returns an integer with the total number of executed statements. |
* **dBGetQueryData(Query):** executes the SQL Select statement contained in the Query parameter, and returns the results as a TastTableData variable to the executor, which allows access and work with the data in later steps of the diagram. The Query parameter contains the Select statement to execute in the database. It is possible to use variables created in the diagram within the Query parameter, the function will substitute the variables for their values at run time.(Input parameter (Query), Output parameter (OutputTable)). | * **dBGetQueryData(Query):** executes the SQL Select statement contained in the Query parameter, and returns the results as a TastTableData variable to the executor, which allows access and work with the data in later steps of the diagram. The Query parameter contains the Select statement to execute in the database. It is possible to use variables created in the diagram within the Query parameter, the function will substitute the variables for their values at run time.(Input parameter (Query), Output parameter (OutputTable)). | ||
Line 31: | Line 31: | ||
* **getNumRows():** returns the number of rows contained in the TastTableData that was generated by the execution of the dBGetQueryData function. It requires the execution of the dBGetQueryData function in previous steps of the diagram. (Don’t need an input parameter, so it’s a function that just return the number of rows of the selected table (with TastTableData)). | * **getNumRows():** returns the number of rows contained in the TastTableData that was generated by the execution of the dBGetQueryData function. It requires the execution of the dBGetQueryData function in previous steps of the diagram. (Don’t need an input parameter, so it’s a function that just return the number of rows of the selected table (with TastTableData)). | ||
+ | |||
+ | * **getOraError():** provides the ORA error code of the executed SQL query. | ||
+ | |||
+ | * **getSQLSTATE():** provides the SQL status. | ||
* **getTableValue(RowNum, ColNum):** returns the value contained in the cell indicated by the parameters Row and Col. It requires the execution of the dBGetQueryData function in previous steps of the diagram. (Input parameters are the row and the column you need to display, and the output should be the information contained there). | * **getTableValue(RowNum, ColNum):** returns the value contained in the cell indicated by the parameters Row and Col. It requires the execution of the dBGetQueryData function in previous steps of the diagram. (Input parameters are the row and the column you need to display, and the output should be the information contained there). |