Oups j'ai zappé ce topic.
J'ai trouvé la solution :
string Path = Application.ExecutablePath;
Path = Directory.GetParent(Path).ToString();
Path = Directory.GetParent(Path).ToString();
Path = Directory.GetParent(Path).ToString();
Path = Path.Replace("\\", "/");
Path = Path + "/historique/historique.txt";
maRequeteHistoComplet = "SELECT * FROM tblhistorique INTO OUTFILE @Chemin FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n'";
maCommandeHistoComplet = new MySqlCommand(maRequeteHistoComplet, maConnexion);
maCommandeHistoComplet.Parameters.Add(new MySqlParameter("@Chemin", MySqlDbType.String, 35));
try { maCommandeHistoComplet.Parameters["@Chemin"].Value = Path; }
catch { };
try
{
maCommandeHistoComplet.Connection.Open();
maCommandeHistoComplet.ExecuteScalar();
maCommandeHistoComplet.Connection.Close();
}
catch { MessageBox.Show("Erreur lors de la création du fichier"); }
string Path1 = Application.ExecutablePath;
Path1 = Directory.GetParent(Path).ToString();
Path1 = Directory.GetParent(Path).ToString();
Path1 = Directory.GetParent(Path).ToString();
Path1 = Path1 + "\\historique.txt";
try
{
Process proc = new Process();
proc.StartInfo = new ProcessStartInfo(Path1);
proc.Start();
}
catch
{
MessageBox.Show("Erreur, fichier non trouvé");
}
La fin me permet d'ouvrir le fichier.
En faite le problème était lié au sens des slash et il fallait aussi mettre le chemin entier dans la requête.