title: System.Data.SqlClient.SqlException: 'Incorrect syntax near '​'.'
body: <p>I get this SQL Server error and I can't figure out where the trouble is:</p>
  
  <blockquote>
    <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
    
    <p>xception Details: System.Data.SqlClient.SqlException: 'Incorrect syntax near '​'.'</p>
    
    <p>Source Error:  Line: 46</p>
    
    <p>Error Line:  cmdsql.ExecuteNonQuery()</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>Dim connexcel As OleDbConnection
  Dim daexcel As OleDbDataAdapter
  Dim dsexcel As DataSet
  Dim cmdexcel As OleDbCommand
  Dim drexcel As OleDbDataReader
  
  Dim connsql As SqlConnection
  Dim dasql As SqlDataAdapter
  Dim dssql As DataSet
  Dim cmdsql As SqlCommand
  Dim drsql As SqlDataReader
  
  Private Sub import_excel_to_sql_server_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Me.CenterToScreen()
  End Sub
  
  Private Sub BtnImpExcelFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnImpExcelFile.Click
      On Error Resume Next
      OpenFileDialog1.Filter = "(* .xls) | * .xls | (*. Xlsx) | *. xlsx | All files (*. *) | *. * "
             OpenFileDialog1.ShowDialog()
      FileAdd.Text = OpenFileDialog1.FileName
      connexcel = New OleDbConnection("provider = Microsoft.ace.OLEDB.12.0; data source =" &amp; FileAdd.Text &amp; "; Extended Properties = Excel 8.0;")
      connexcel.Open()
  
      Dim dtSheets As DataTable = connexcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
      Dim listSheet As New List(Of String)
      Dim drSheet As DataRow
  
      For Each drSheet In dtSheets.Rows
          listSheet.Add(drSheet("TABLE_NAME").ToString())
      Next
  
      For Each sheet As String In listSheet
          ExcelSheetList.Items.Add(sheet)
      Next
  End Sub
  
  Private Sub ExcelSheetList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExcelSheetList.SelectedIndexChanged
      daexcel = New OleDbDataAdapter("select * from [" &amp; ExcelSheetList.Text &amp; "]", connexcel)
      dsexcel = New DataSet
      daexcel.Fill(dsexcel)
      DGVImpData.DataSource = dsexcel.Tables(0)
      DGVImpData.ReadOnly = True
  End Sub
  
  Sub connections()
      connsql = New SqlConnection("data source =. \ MSSMLBIZ; initial catalog = MyInvoice; integrated security = true")
      connsql.Open()
  End Sub
  
  Private Sub BtnSaveImpData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSaveImpData.Click
      For line As Integer = 0 To DGVImpData.RowCount - 2
          Call connections()
          Dim save As String = "insert into InvoiceData values ​​('" &amp; DGVImpData.Rows(line).Cells(0).Value &amp; "', '" &amp; DGVImpData.Rows(line).Cells(1).Value &amp; "')"
      cmdsql = New SqlCommand(save, connsql)
          cmdsql.ExecuteNonQuery()
      Next
      MsgBox("data saved successfully")
      DGVImpData.Columns.Clear()
  End Sub
  </code></pre>