SQL server connection
Posted on 2005-04-21
I have an application that connect to SQL server database using the following connection string
workstation id=ABC;packet size=4096;user id=XYZ;password=pass;data source=xx.xx.xx.xx;persist security info=False;initial catalog=MyDB;Language=arabic
If connection fail I display a message "Service not available" when the user press a button that connects to my database.
My problem is that when internet goes down and come back again, the message is displayed many when the user presses the button. After many rials the application connect to the database. Please note that I could open websites using IE on the same machine at the time my application displays "Service not available".
It seems to me as the application cash the status of the connection and I have to referesh it. How can I do this?