private void ExecuteSql(string DataBaseName,string Sql,SqlParameter[] prams) 
      { 
         System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand(Sql,sqlConnection1); 
         Command.CommandType = CommandType.StoredProcedure;
         if (prams != null) 
{
foreach (SqlParameter parameter in prams)
Command.Parameters.Add(parameter);
}         Command.Connection.Open(); 
         Command.Connection.ChangeDatabase(DataBaseName); 
         try 
         { 
            Command.ExecuteNonQuery(); 
         } 
         finally 
         { 
            Command.Connection.Close(); 
         } 
      }