To check if connection with Oracle DB is successful

Hi all,

I am querying Oracle DB from UI Path studio in try block. Now in Finally block, I need to disconnect the connection. Before doing that, I need to check if my connection was successful.

Can anyone suggest me how can I check if the connection with Oracle DB was successful ?

Thanks

connSuccess = false

try
{
//create connection
connSuccess = true
}
catch
{
connSuccess = false
}
finally
{
if (connSuccess = true)
closeConnection
}

Thanks, this seems to be very easy. I was hoping for some activity that could help. But never mind, the suggestion helps!

Thanks much!

1 Like