In the mysql client:
DELIMITER $$ CREATE PROCEDURE test( aparam VARCHAR(50) ) BEGIN SELECT * FROM mytable; END $$ DELIMITER ; C# code for dotNet:mycommand = new MySqlCommand( procName, myconn ); myda = new MySqlDataAdapter( mycommand ); myparam = mycommand.Parameters.Add( new MySqlParameter( "?aparam", MySqlDbType.Int32 ) ); myparam.value = "Anything you need"; mycom.ExecuteNonQuery(); if( myda != null ) myda.Fill( aDataTable ); |