Jump to content


Photo

TCP Provider: An existing connection was forcibly closed by the remote host

TNextDBGrid TCP Provider Connection forcibly closed

  • Please log in to reply
2 replies to this topic

#1 IUnknown

IUnknown
  • Members
  • 13 posts
  • Gender:Male
  • Location:Niedersachsen, Deutschland
  • Interests:COM/Multithreading/API/eCommerce

Posted 25 May 2017 - 02:20 PM

Hi Boki,

 

I use grid: TNextDBGrid (5.9.85) bound to ds: TDataSource which is bound to rs: TADODataSet.

Time to time rs component queries SQL Server and fetches the results to the grid.

 

However... when the connection between by application and SQL Server is broken, grid cannot recover the broken connection.

The exception I get is on the attached screenshot: TCP Provider: An existing connection was forcibly closed by the remote host.

So far I do not know how to recover it programmatically without loosing the grid's functionality. Now I have to close the form and re-run my application.

I am also not sure which particular component causes this exception.

 

I would be very grateful if someone helps me to debug this exception and find an option to properly handle it to reinstate the connection without losing grid connectivity.

Attached Files


There are 10 types of people. Those who understand binary and those who don't.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,580 posts
  • Gender:Male

Posted 27 May 2017 - 12:03 PM

Hi,

Do you maybe get a breakpoint (somewhere in grid's code) when exception occur?

Maybe one extra checking for DataSet availability can help here.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 IUnknown

IUnknown
  • Members
  • 13 posts
  • Gender:Male
  • Location:Niedersachsen, Deutschland
  • Interests:COM/Multithreading/API/eCommerce

Posted 29 May 2017 - 12:57 AM

Thanks Boki,

 

You mean that the exception is fired not at grid's, but at DataSet's level?

I will do some tests with the app running under IDE with the suggested breakpoint(s) set.

 

Thank you for a good idea!


There are 10 types of people. Those who understand binary and those who don't.





Also tagged with one or more of these keywords: TNextDBGrid, TCP Provider, Connection forcibly closed

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users