f_asmaa
asked on
SQL server connection
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=arab ic
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?
workstation id=ABC;packet size=4096;user id=XYZ;password=pass;data source=xx.xx.xx.xx;persist
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?
ASKER
How can I check the status of the connection?
I foregot to mention that I am using the connection timeout in my connection string, the complete connection string is
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=arab ic;connect ion timeout=4
I foregot to mention that I am using the connection timeout in my connection string, the complete connection string is
workstation id=ABC;packet size=4096;user id=XYZ;password=pass;data source=xx.xx.xx.xx;persist
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
check the status of the connection, I would be intrested in seeing what it comes up as.
Greg