dbTalk Databases Forums  

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

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss A transport-level error when calling SqlCommand.ExecuteNonQuery() in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roy
 
Posts: n/a

Default A transport-level error when calling SqlCommand.ExecuteNonQuery() - 09-28-2007 , 03:12 PM






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?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.