2016-03-15 511 views
1

我在最簡單的錯誤From子句(錯誤碼:-2147217900),我不知道爲什麼......語法錯誤FROM子句(from子句最簡單的可能)

這裏我的代碼:

static string ConnString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=E:\\P-OT-MT\\P-OT-DB.accdb; Jet OLEDB:Database Password=*************;"; 
    public static DataSet DS_USERS; 

    public static void INIT_DS() 
    { 
     // Initialize the USERS dataset and write the database information to it 
     DS_USERS = new DataSet(); 
     string SQL = "SELECT * FROM USER;"; 
     using (OleDbConnection Conn = new OleDbConnection(ConnString)) 
     { 
      Conn.Open(); 
      OleDbCommand cmd = new OleDbCommand(SQL, Conn); 
      OleDbDataAdapter adapter = new OleDbDataAdapter(cmd); 
      adapter.Fill(DS_USERS); 

      cmd.Dispose(); 
      adapter.Dispose(); 
      Conn.Close(); 
     } 
    } 

我不明白哪裏出錯......表用戶是existant和數據庫的位置也是正確的......密碼太正確...

我希望你能幫助我

回答