Hi,
I have a function to write to a database, however before writing to the database I want to check if the database server is available, if it is not available i would like to check the availability every minute for three minutes (3 tries to connect to the database), before giving up and producing an appropriate error message.
Can anybody give me a solution to the above problem.
Is there any function in C++ something like wait or stop which stops the execution of a particular function for a given time before retrying to execute the function.
Thanks,
tewari
I have a function to write to a database, however before writing to the database I want to check if the database server is available, if it is not available i would like to check the availability every minute for three minutes (3 tries to connect to the database), before giving up and producing an appropriate error message.
Can anybody give me a solution to the above problem.
Is there any function in C++ something like wait or stop which stops the execution of a particular function for a given time before retrying to execute the function.
Thanks,
tewari