title: Inserting into Access database from NetBeans
body: <p>I have created a GUI based Hotel Management System in java netbeans which is connected with Ms Access Database. In database, i have a table named "RoomInfo".</p>
  
  <p>When i try to execute the following query, i get two kinds of errors. </p>
  
  <pre><code>String sql = "INSERT INTO RoomInfo(RoomNumber,Reserved,RoomCategory,AirConditioned,
      BedType, RentPerDay)VALUES("+objr.roomno+","+objr.reserved+","+objr.category+","
     +objr.AirConditioned+","+objr.bedtype+","+objr.rent+")";
  </code></pre>
  
  <p>First error is <code>net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.7 unexpected token: ,</code> I get this error when i leave all the Jtextfields empty and try to insert new record in to the database.</p>
  
  <p>Second Error is <code>net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.7 user lacks privilege or object not found: Economy</code> (Economy is the entry for room category) I get this error when i enter data in to the Jtextfields and try to save it in to the database.</p>
  
  <p>Need help identifying the problem.</p>