Page 1 of 1
					
				cancel command
				Posted: Fri  07 Jan 2005 21:52
				by DaveRob
				I'd like to cancel a command while it is processing.  Is it possible?  I know there's a Cancel method with mysqlcommand but the help says : This command is not supported!  So is there any another way?
			 
			
					
				Re: cancel command
				Posted: Mon  10 Jan 2005 12:20
				by Oleg
				The only possibility to break an execution of command in MySQL is to break a connection so we are unable to implement method MySqlCommand.Cancel well.
			 
			
					
				
				Posted: Mon  10 Jan 2005 17:29
				by DaveRob
				MySQL does not return a process ID?  Which we could use to kill the job.
			 
			
					
				
				Posted: Tue  11 Jan 2005 14:40
				by Oleg
				It is possible to break an execution of the command if to cut a connection or remove process at the server using KILL command.
But it isn't a good solution as after executing of this operation that relates to the command we have invalid connection. So MySqlCommand.Cancel method we cannot implement as this method will close a connection. You can have another commands associated with the same connection, but this behaviour can cause problems in your code.
We can implement method MySqlConnection.Kill that will close a connection and break an execution of the command on this connection.
			 
			
					
				
				Posted: Tue  11 Jan 2005 15:34
				by DaveRob
				The kill method could be interesting even if all other commands associated with this connection would be killed.  If we know that we just have to take care and don't associate another commands to the connection.
			 
			
					
				
				Posted: Fri  14 Jan 2005 07:26
				by Oleg
				We are planning to add Kill method for MySqlConnection.
It will be in the next version of MySQLDirect .NET that will be available in about a month.