Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / September 2007

Tip: Looking for answers? Try searching our database.

A transport-level error when calling SqlCommand.ExecuteNonQuery()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roy - 28 Sep 2007 21:12 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.