у меня эта ошибка No Value given for one or more required parameter
в чем может быть причина ошибки. вот код
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + postdir + newFileNameOnServer + "; Extended Properties=Excel 8.0";
using (OleDbConnection connection =new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand("Select Month,Year,CountryofExport,CountryofOrigin,Hs_code,quantity,Unit,CustomValue,Type FROM [qryTradeFlowforWeb$]", connection);
connection.Open();
// Create DbDataReader to Data Worksheet
using (DbDataReader dr = command.ExecuteReader()) // the error coming here
{
string sqlConnectionString = ConfigurationManager.ConnectionStrings["KMFConnectionString"].ToString();
SqlConnection conn = new SqlConnection(sqlConnectionString);
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "ExcelData";
bulkCopy.WriteToServer(dr);
}
}
}