[CLOSED] BADRESPONSE: missing ) in parenthetical

  1. #1

    [CLOSED] BADRESPONSE: missing ) in parenthetical

    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).ToString().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\"";
            }
              
            oleConnection.Open();
    
    
            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();
                con.Close();
    
    
                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", "");
    
    
                con.Open();
                com.ExecuteNonQuery();
    
    
                con.Close();
            }
        }
    thank you in advance
    Last edited by Daniil; Jan 16, 2015 at 9:13 AM. Reason: [CLOSED]
  2. #2
    Hi,I think you should set Directresult's IsUpload property to true.if not working please provide simplified test case.
  3. #3
    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.

Similar Threads

  1. [CLOSED] TextField input: BADRESPONSE: missing ) in parenthetical
    By tanky65 in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 13, 2013, 10:14 PM
  2. [CLOSED] BADRESPONSE: missing ) in parenthetical
    By gs_user in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 24, 2012, 10:49 AM
  3. Please help:BADRESPONSE: Expected ')'
    By tmducit in forum 1.x Help
    Replies: 1
    Last Post: Apr 12, 2012, 2:59 PM
  4. Status Code 200: BADRESPONSE: missing } in XML expression
    By marcossoft in forum 1.x Legacy Premium Help
    Replies: 32
    Last Post: Oct 09, 2010, 6:46 AM
  5. BADRESPONSE: missing } after property list
    By designworxz in forum 1.x Help
    Replies: 7
    Last Post: Feb 17, 2009, 8:47 PM

Posting Permissions