View Full Version : [CLOSED] BADRESPONSE: missing ) in parenthetical

Jan 08, 2015, 12:15 PM
Dear Sir,

when i upload excel sheet in localhost it's work fine without any problem , but in the server it's give me this error :
BADRESPONSE: missing ) in parenthetica

what i should do to solve this issue ?

my code :

public static void importDataFromExcel(string InvoiceNo, string excelFilePath)
OleDbConnection oleConnection = new OleDbConnection();
string strFileType = System.IO.Path.GetExtension(excelFilePath).ToStrin g().ToLower();

if (strFileType.Trim() == ".xls")
oleConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + excelFilePath + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
else if (strFileType.Trim() == ".xlsx")
oleConnection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + excelFilePath + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";


OleDbCommand oleCommand = new OleDbCommand("SELECT * From [InvoiceItems$]", oleConnection);

OleDbDataReader reader = oleCommand.ExecuteReader();

SqlConnection con = Connections.GetSQLConnection();

while (reader.Read())
string HSCODE = reader[0].ToString();
string Description = reader[1].ToString();
string ItemTariff = reader[2].ToString();

string insquery = "INSERT INTO [Translation_Provisions] ([Item], [HSCODE], [Description], [ItemTariff]) VALUES (@Item, @HSCODE, @Description, @ItemTariff)";
SqlCommand com = new SqlCommand(insquery, con);

com.Parameters.AddWithValue("@Description", Description);
com.Parameters.AddWithValue("@ItemTariff", ItemTariff);
com.Parameters.AddWithValue("@ItemDescription", ItemDescription);
com.Parameters.AddWithValue("@Item", "");



thank you in advance

Jan 08, 2015, 12:18 PM
Hi,I think you should set Directresult's IsUpload property to true.if not working please provide simplified test case.

Jan 08, 2015, 12:35 PM
Hi @elbanna23,

Please clarify are you testing in the same browsers when you test it locally with your development environment and with the deployed application?

I guess it is an issue with browsers rather than with servers.