problem with mysql export to file in c# -
have problem mysql+c# in mysql export operation.
folderbrowserdialog fol=new folderbrowserdialog(); if (fol.showdialog() == dialogresult.ok) { string path= fol.selectedpath; string sql = "select * outfile '" + path+ "\person.csv' fields terminated by',' optionally enclosed '\"' lines terminated '\n' tpers "; mysqlcommand daa = new mysqlcommand(sql, conn); conn.open(); daa.executenonquery(); conn.close(); }
for example
path = "c:\export"
when execute code doesnt export person.csv intended path.
creates "c:export\person.csv" file , creates file in mysql/data folder..
can u explain problem, , how fix it...
i solved problem..
string path = fol.selectedpath; path = path.replace("\\","/"); ...
after program works correctly...
Comments
Post a Comment