So I know how to get the installer to check for SQL Server dependancy, I'm trying to figure out how to make my service (after it's started) check if sql server is still running.
Or would a windows service that's dependant on sql server stop when the sql server service stops?
This is my code currently:
Is that okay? Or overkill? Or do I approach it differently?
Thanks for any input
Or would a windows service that's dependant on sql server stop when the sql server service stops?
This is my code currently:
Code:
Dim blnContinue = False
While blnContinue = False
Try
Dim conn As New SqlConnection(connStr)
conn.Open()
conn.Close()
blnContinue = True
Catch ex As System.Exception
blnContinue = False
Thread.Sleep(5000)
End Try
End While
...'further down in my code in the main While loop of the thread I check if the write to sql server was successful, if not I wait for a response from sql server before continuing
Is that okay? Or overkill? Or do I approach it differently?
Thanks for any input