I have a stored procedure with some input parameter and one output parameter.
I use SqlCommand and SqlParameter as following
///Set some imput parameters here
parameter = cmd.CreateParameter();
parameter.ParameterName = "OutputParameter";
parameter.DbType = DbType.String;
parameter.Size = 16;
parameter.Direction = ParameterDirection.Output;
cmd.Parameters.Add(parameter);
cmd.ExecuteNonQuery();
However, the last statement generate the following error and the connection
closed because of that:
A transport-level error has occurred when receiving results from the server.
(provider: TCP Provider, error: 0 - The specified network name is no longer
available.)
Any ideas?
Ekrem Önsoy - 29 Sep 2007 09:10 GMT
It look you lost connection with the SQL Server.
You may get this error when you were working with SSMS too. You click New
Query and type queries against your database but when your connection
expries, you get that error and you need to click that New Query button to
establish a new connection to your SQL Server.
You may want to increase connection timeout in your connection string.

Signature
Ekrem Önsoy
>I have a stored procedure with some input parameter and one output
>parameter.
[quoted text clipped - 22 lines]
>
> Any ideas?