Check DB accessibility

Status
Not open for further replies.

Alain Rossi

Silver Partner
Advanced Certified
Joined
Jun 9, 2017
Messages
5
Reaction score
1
Hi everyone, I have implemented a CFD program that requests a value in a SQL table and then makes a call with the returned value.
I would like to do a security check to verifyng if the SQL database is working but I don't know how... Has anyone had the same problem as me?
Something that writes into a variable whether the database is accessible (1) or not accessible (0)
 
If you want to check if the connection with the database can be established, the only way is doing this using a User Defined Component. You would need to do the following:
1) Create a User Defined component.
2) Add a Database Access component to the main flow, and run a dummy query.
3) Define a public variable in this User Defined component, for example "DatabaseWorking".
4) After the Database Access component, set the variable "DatabaseWorking" to true.
5) In the Error Handler flow, set the "DatabaseWorking" variable to false.
6) From the Main callflow, use this component. After executing it, you can check the variable.
 
It works perfectly, thank you very much!
 
Status
Not open for further replies.