This shows you the differences between two versions of the page.
database_adaptor [2024/11/11 11:31] montse [Managing Variables in the database Adaptor] |
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 ===== | ||
- | * **connect_DB():** Tries to connect to the configured database. Returns true if it succeeds or false otherwise. On the properties of the object in the Database Adaptor there are some parameter boxes to do the configuration about the Database we are going to use. There will be, once the function is executed, a log with different messages if the connection was a succeed or not. | + | * **connect_DB():** tries to connect to the configured database. Returns true if it succeeds or false otherwise. On the properties of the object in the Database Adaptor there are some parameter boxes to do the configuration about the Database we are going to use. There will be, once the function is executed, a log with different messages if the connection was a succeed or not. |
- | * **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)). |
- | * **disconnect_DB():** Tries to disconnect from the database. Returns true if it succeeds or false otherwise. (As the function connect_DB this function returns an error message if the disconnection fails otherwise returns a succeed message). | + | * **disconnect_DB():** tries to disconnect from the database. Returns true if it succeeds or false otherwise. (As the function connect_DB this function returns an error message if the disconnection fails otherwise returns a succeed message). |
- | * **getNumColumns():** Returns the number of columns 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 columns of the selected table (with TastTableData)). | + | * **getNumColumns():** returns the number of columns 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 columns 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)). | + | * **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)). |
- | * **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). | + | * **getOraError():** provides the ORA error code of the executed SQL query. |
- | * **tableRecordCount(TableName, WhereClausule):** Performs a SQL query using the SQL Count (*) function. The tableName parameter represents the name of the table or view to be used for the Query, and the whereClausule parameter represents the SQL where clause that we must apply. Returns the number of rows counted by the sentence. | + | * **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). | ||
+ | |||
+ | * **tableRecordCount(TableName, WhereClausule):** performs a SQL query using the SQL Count (*) function. The tableName parameter represents the name of the table or view to be used for the Query, and the whereClausule parameter represents the SQL where clause that we must apply. Returns the number of rows counted by the sentence. | ||
* **transfromSelectIntoInsert:** transforms the result of the select entered as a parameter into an insert. | * **transfromSelectIntoInsert:** transforms the result of the select entered as a parameter into an insert. |