Sunday, February 19, 2012

"[DBNETLIB]ConnectionWrite (send())" && "Communication link failure"

Hi ALL

I am facing a strange problem using ADO to connect Sql Server that I can not resolve it.

My program connected to SqlServer when it started, the state of the connectionPtr was adoStateOpen.Then I disable the network card and enable it immeditately, the errors happened when I executed the sql query probably because of connectionPtr was invalid,but the state of connectionPtr was always adoStateOpen.

1)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()).

2)Msg: Unspecified error Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver]Communication link failure.

Should I reconnect to SqlServer?How can I catch this error when the connection is valid except other errors?

Sorry,my english is poor and thanks for your response.

Thanks a lot.

Env:

1)OS : Windows 2000 Server

2)SqlServer:Sql Server 2000

When you disable network card, the OS may inform network layer to invalidate the socket we are using. The problem you described could happen, and we don't support this scenario.

Btw, why do you want to disable network card?

No comments:

Post a Comment