Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
disconnected sql server when run stored procedure.
when i try to create or alter stored procedure it automatically disconnected dbserver.
 
only for stored procedure create,alter.
 
this error I am get it.
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)
How to solve this issue...
 
Thanks,
Karthikeyan,Bangalore.
Posted 14-Nov-12 19:19pm
Edited 15-Nov-12 18:55pm
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here is an example; put your code inside that conn.open() and conn.close().
Hope it works.
conn.Open();
SqlCommand cmd = new SqlCommand(@"select _regno from _registration", conn);
SqlDataAdapter ada = new SqlDataAdapter(cmd);
dt = new DataTable();
ada.Fill(dt);
conn.Close();
  Permalink  
Comments
pkarthionline at 16-Nov-12 0:54am
   
Only sql server alter,create .i Get this error .
 
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
biswarup88 at 17-Nov-12 0:27am
   
have you tried the above code format?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 329
3 Sergey Alexandrovich Kryukov 290
4 CPallini 219
0 OriginalGriff 697
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 495
3 thatraja 370
4 Sergey Alexandrovich Kryukov 344


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100