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 1,310
1 Sergey Alexandrovich Kryukov 726
2 Tadit Dash 345
3 OriginalGriff 313
4 Manas Bhardwaj 215
0 Sergey Alexandrovich Kryukov 11,700
1 OriginalGriff 6,980
2 Peter Leow 4,915
3 Abhinav S 3,838
4 Maciej Los 3,575


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