Click here to Skip to main content
13,403,870 members (47,537 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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...

Posted 14-Nov-12 20:19pm
Updated 15-Nov-12 19:55pm

1 solution

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

Solution 1

Here is an example; put your code inside that and conn.close().
Hope it works.
SqlCommand cmd = new SqlCommand(@"select _regno from _registration", conn);
SqlDataAdapter ada = new SqlDataAdapter(cmd);
dt = new DataTable();
pkarthionline 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.1802120.2 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2018
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