Re: Database connection is disconnected due to "network error"
- From: "William Vaughn" <billvaNoSPAM@xxxxxxxxx>
- Date: Fri, 4 Jan 2008 11:04:39 -0800
Sure. It's the same engine. If the SQL Server is local (on the client system) then try to use the Shared Memory provider. This is selected by using "." or "(local)" as the system name instead of a named server. You still have to reference the instance so, SQLEXPRESS on a local system would be:
Server=.\SQLEXPRESS
or
Server=(local)\SQLEXPRESS
Since the ACK/NAK is handled differently, it MIGHT eliminate the problem, but to be sure, have the application ping the server every minute or so to keep the server engine aware that the client is still alive. If the client makes no requests in a long time (settable option IIRC), it assumes it's dead and closes the connection from the server end. To ping the server, just execute "SELECT Column FROM myTable WHERE 1=0".
I discuss these issues in the book.
hth
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"pwml" <pwml@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:565C0602-5472-49F2-9494-E8B0ABAB6F94@xxxxxxxxxxxxxxxx
Hi Bill,
Happy new year!
Yes, database connections are alive during the life of application, they are
created when the software loads up and closed when it shuts down. The thing
is although the system is connected in a LAN, the software itself is desktop
application rather that Server-Client kind. The database of MSDE was created
locally. Dose it still matter?
Peter
"William Vaughn" wrote:
I would still look for topology issues. That is, the infrastructure between
the client and the server. This is common when a WAN is involved. I have
also seen bad cables, high humidity and other hardware issues cause or
contribute to this. Another area of investigation is activity. If the
connection is dormant for extended periods, the ACK/NAK between the client
and server can timeout and the server will close the connection which might
be handled as a hardware failure.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"pwml" <pwml@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E3BCB603-CC0B-4918-95CD-E83388898B7E@xxxxxxxxxxxxxxxx
>I have an application which is connected to SQL Server databases via
> ADOconnections. Most of the time it works fine. However from time to > time
> I
> got
> the error message “[DBNETLIB][ConnectionWrite,WrapperWrite()).] General
> network error. Check your network documentation.” The thing is we have > no
> problem with the network. The connections could be reconnected, but I > lost
> data when the error occurred. Thanks advance for any help.
>
> The application was created by VS C++ 6.0,
> ADO version is 2.8,
> SQL Server 2000 - 8.00.760 (Desktop Edition, sp 3),
> OS: Windows XP sp2
>
> Peter
.
- References:
- Prev by Date: Re: Connection to SQL Server 2005 lost
- Next by Date: Re: Connection to SQL Server 2005 lost
- Previous by thread: Re: Database connection is disconnected due to "network error"
- Next by thread: Re: Connection to SQL Server 2005 lost
- Index(es):
Relevant Pages
|
Loading