My Code block is
public static DataSet GetCSVDataSet(string pFilePath)
{
DataSet ds = new DataSet();
if (File.Exists(pFilePath))
{
string fileName = Path.GetFileName(pFilePath);
string folder = pFilePath.Replace(fileName, "");
string connString = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""{0}"";Extended Properties=""text;HDR=Yes;IMEX=1;FMT=Delimited;CHARSET=UNICODE\""", folder);
OleDbConnection conn = new OleDbConnection(connString);
string qry = string.Format("Select [ProductId],[ProductName],[ProductNameKana],"+
"[ProductUrl],[Publisher],[PublisherId],[ProductPrice]," +
"[ProductSmallImageUrl],[ProductImageUrl],[ProductLargeImageUrl]," +
"[ProductThumbnailImageUrl],[ProductDescription]," +
"[ScheduleID] from {0}", fileName);
try
{
using (OleDbCommand cmd = new OleDbCommand(qry, conn))
{
cmd.Connection.Open();
using (OleDbDataAdapter odda = new OleDbDataAdapter(cmd))
{
odda.Fill(ds);
}
cmd.Connection.Close();
}
}
catch (Exception ex)
{
ErrorLog.WriteLog("XLReader", "GetCSVDataSet", ex.Message, ex.StackTrace, pFilePath);
}
finally
{
if (conn != null)
{
if (conn.State != ConnectionState.Closed)
{
conn.Close();
}
conn = null;
}
ds.Dispose();
}
}
return ds;
}
But while read Japanese character it is not working
Like エスエフミックス show as 手塚プãƒãƒ€ã‚¯ã‚·ãƒ§ãƒ³
Please help