|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Connection Unexpectedly Terminated! I am having a strange problem with the MySQL Connector .NET 1.0.6. I am trying to develop a .NET (Version 1.1 SP1) application on a Windows 2000 Professional machine with MySQL Server 4.1.14 version. A huge amount of SQL query does execute for about 40 minutes but then cancels with the exception "Connection unexpectedly terminated". I don't know waht is wrong in this Please provide some views regarding this |
#2
| |||
| |||
Re: Connection Unexpectedly Terminated! try { // Edit connection settings here! MySqlConnection conn = new MySqlConnection( "server=localhost;user id=xxx;password=yyy;database=zzz;port=3306" ); conn.Open(); // Do a SELECT on a table with many rows here! MySqlCommand cmd = new MySqlCommand( "SELECT * FROM xyz LIMIT 1000", conn ); MySqlDataReader reader = cmd.ExecuteReader(); while ( reader.Read() ) { // Let's sleep for a moment. Important for reproducing the bug! Thread.Sleep( 2400 ); } MessageBox.Show( this, "Done" ); } catch( Exception ex ) { MessageBox.Show( this, ex.Message, "Exception!", MessageBoxButtons.OK, MessageBoxIcon.Error ); } Since the bug seems to be strongly connected to some timeout, I've tried to manipulate several server variables which are related to timeout settings. |
#3
| |||
| |||
Re: Connection Unexpectedly Terminated! Could you post your connectionstring? Wich version of the Mysql .Net connector are you using? Do you get this error always? Can you make an connection by using server explorer and create a new dataconnection? |
#4
| |||
| |||
Re: Connection Unexpectedly Terminated! Stack Trace: [HttpException (0x80004005): Request timed out.] i have set the connection string with connect timeout 3000. surely it shold not take that long |
#5
| |||
| |||
Re: Connection Unexpectedly Terminated! Are you sure you can access that database? Can you access it by some other tool? Have you checked that your connecting at the right port? Is there a firewall between? I have installed one of the 5.x.x mysql connectors for .Net and i can make a connection from Server Control (New connection, and then change type to mysql) Have you tried installing a new version of mysql connector? |
![]() |
|
Tags: connection, database, oracle, sql, sql server, terminated, unexpectedly |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting error message "The TCP/IP connection was unexpectedly terminated by the server (NNTP)" | Nearer | Networking & Security | 7 | 29-01-2012 11:11 AM |
error ?Malwarebyte service terminated unexpectedly? | Kaalia | Networking & Security | 6 | 22-12-2011 07:34 PM |
The Print Spooler service terminated unexpectedly. | Drewski | Windows XP Support | 6 | 08-08-2011 05:09 AM |
Intellisync - The operation Terminated unexpectedly | Agaev | Portable Devices | 5 | 24-07-2010 06:13 AM |
System shutdown due to RPC terminated unexpectedly | Hardik | Windows XP Support | 6 | 07-08-2009 05:12 PM |