G
Guest
I have a client PC running a C# program that obtains data from an SQL Server
database. The computer hosting the database is on a local network and is
accessed by using the following connection string: Both computers are
Windows XP SP2.
"Data Source=192.168.20.124,1433;Network Library=DBMSSOCN;Initial
Catalog=CenterDB;User ID=myUserID;Pwd=myPassword;"
The key lines in my code are:
cnPubs = new SqlConnection(...........)
SqlCommand cmdOrder = new SqlCommand("dbo.SC_GetOrderByAC", cnPubs);
cmdOrder.ExecuteNonQuery();
In almost all cases the client can access the database except for a certain
situation. If I shutdown the database computer and restart it, sometimes the
client cannot make a connection to the database and causes an exception in my
code. It is extremely intermittent and hard to duplicate. The exception
that I get is: <SqlException: SQL Server does not exist or access denied.>
Does anyone have any ideas about what might be causing this intermittent
behavior or what I can try to track down the cause of the problem?
database. The computer hosting the database is on a local network and is
accessed by using the following connection string: Both computers are
Windows XP SP2.
"Data Source=192.168.20.124,1433;Network Library=DBMSSOCN;Initial
Catalog=CenterDB;User ID=myUserID;Pwd=myPassword;"
The key lines in my code are:
cnPubs = new SqlConnection(...........)
SqlCommand cmdOrder = new SqlCommand("dbo.SC_GetOrderByAC", cnPubs);
cmdOrder.ExecuteNonQuery();
In almost all cases the client can access the database except for a certain
situation. If I shutdown the database computer and restart it, sometimes the
client cannot make a connection to the database and causes an exception in my
code. It is extremely intermittent and hard to duplicate. The exception
that I get is: <SqlException: SQL Server does not exist or access denied.>
Does anyone have any ideas about what might be causing this intermittent
behavior or what I can try to track down the cause of the problem?