title: Syntax error in FROM clause vb.net
body: <p>Just to let you know this is my first question im posting on this website, so please if I've missed anything just let me know. The problem im having is this, when the program runs im getting the following error message</p>
  
  <p>Syntax error in FROM clause</p>
  
  <p>The code is here</p>
  
  <pre><code>    Dim dbProvider As String
      Dim dbSource As String
      Dim con As New OleDb.OleDbConnection
      Dim ds As New DataSet
      Dim MaxRows As Integer
      Dim sql As String
      Dim TableName As String
      Dim TableCreate As New OleDb.OleDbCommand("CREATE TABLE [" &amp; TableName &amp; "](" &amp; "ID INTEGER NOT NULL," &amp; ")", con)
      Dim da As New OleDb.OleDbDataAdapter("SELECT * FROM  [" &amp; TableName &amp; "]", con)
      Dim cb As New OleDb.OleDbCommandBuilder(da)
  
      TableName = TbTableName.Text
  
      dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
      dbSource = "Data Source = E:\A2 Computing\Project\PasswordDatabase.mdb"
  
      con.ConnectionString = dbProvider &amp; dbSource
  
      con.Open()
  
      da.Fill(ds, "NewTable")
  
      MaxRows = ds.Tables("NewTable").Rows.Count
  </code></pre>
  
  <p>The Problem im having is at this line</p>
  
  <pre><code>    da.Fill(ds, "NewTable")
  </code></pre>
  
  <p>Im not sure what I've missed out, Im guessing its something to do with the brackets when I declare tablecreate or da? =S Any help would be greatly appreciated. =)</p>