|
-
Nov 10th, 2012, 01:13 AM
#1
Thread Starter
Member
I Want Help On Connection Error With Sql Server
I Have Program With VB6 And SQL Server And Work Ok . But the Problem is when i Stop the server when the client is connected to it and run server again this message appear to me " DBNETLIB ConnectionWrite (WrapperWrite()) General network error .check your network documentation . " ... And This problem appear if i work on the server and stop SQl Service and Start it Again .. My connection With dataenvironement and on dataenvironment intialization i put the connection string . i want to solve this problem
My connection String is :
ServarName = "MyServerName"
DataEnvironment1.Connection1.ConnectionString = "Provider=SQLOLEDB.1;OLE DB Services = -2 ;Password=0000;Persist Security Info=True; User ID=sa;Initial Catalog=TestDB;Data Source = '" & ServarName & "' "
-
Nov 10th, 2012, 02:19 AM
#2
Re: I Want Help On Connection Error With Sql Server
What else would you expect?
When you stop the SQL Service the Clients will all lose connection. You'll have to put something in your program that tests whether the connection is still open before attempting to access the data, if it is then carry on, if it isn't then try to open the connection again. You'll have to trap any connection errors when you re-try in case the SQL Server is still not available. Thus you could notify the clients with your own message that the Server is unavailable and that they should re-try later or words to that effect.
In my experience, it's normal practice and polite, to inform the clients that you're taking the server down for xx minutes and they should close their application.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|