Hi,
I have an website C# ASP.NET, for create for the *.csv file from convert *.xls file in a chosen folder.
The app responsible for making that file takes following steps:
- Make a *.csv file
- Import the *.csv file in an dedicate table using LOAD DATA from MySQL
But there is a problem.
The LOAD DATA not find the *.csv file on the folder
But the *.csv file exists on the folder
'D:\inetpub\wwwroot\public\target_D8BD592B2F99_08-02-2022.csv'
I have tried without success waiting until File.Exists
var timeout = DateTime.Now.Add(TimeSpan.FromMinutes(1));
while (!File.Exists(output))
{
if (DateTime.Now > timeout)
{
Response.Write("Application timeout; app_boxed could not be created; try again");
Environment.Exit(0);
}
Thread.Sleep(TimeSpan.FromSeconds(1));
//LOAD DATA
}
The exact error is
ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.51-community]
File 'D:\inetpub\wwwroot\public\target_D8BD592B2F99_08-02-2022.csv' not found (Errcode: 2)
Any suggestion?