Norbert Eder
Erfahrenes Mitglied
Schau dir einfach die Methode Replace() der Klasse String in der MSDN an, da sind auch Beispiele drinnen.
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
string str_import;
str_import = _ofd.FileName;
for (int i = 0; i < str_import.Length; i++)
{
str_import.Replace("\","\\"); //Hier erschein Syntaxfehler ?
}
OpenFileDialog _ofd = new OpenFileDialog();
_ofd.ShowDialog();
_ofd.OpenFile();
myString.Replace("\\","\\\\");
myString = myString.Replace("\\","\\\\");
private void btn_DS_Import_Click(object sender, System.EventArgs e)
{
OpenFileDialog _ofd = new OpenFileDialog();
_ofd.ShowDialog();
string str_import;
str_import = _ofd.FileName;
for (int i = 0; i < str_import.Length; i++)
{
str_import = str_import.Replace("\\", "\\\\");
}
try
{
odbcConnection1.Open();
OdbcCommand _ins_cmd = new OdbcCommand(
"LOAD DATA INFILE " + " str_import " + " INTO TABLE _import", odbcConnection1);
_ins_cmd.ExecuteNonQuery();
odbcConnection1.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
odbcConnection1.Close();
}
odbcConnection1.Close();
}