title: Bunch of Errors after I run my Code
body: <p>I was trying to add a User in my database using Java with Spring framework(Standalone) but I have encountered problems specifically in this code</p>
  
  <pre><code>package test;
  import dao.FinanceDao;
  import org.springframework.jdbc.datasource.DriverManagerDataSource;
  public class TestDrive {
  
      public static void main(String[] args){
  
          FinanceDao finance = new FinanceDao();
          DriverManagerDataSource dataSource = new DriverManagerDataSource();
          dataSource.setDriverClassName("com.mysql.jdbc.Driver");
          dataSource.setUrl("jdbc:mysql://localhost:3306/payroll");
          dataSource.setUsername("root");
          dataSource.setPassword("123192");
  
          finance.setDataSource(dataSource);
  
          finance.Add("2010-01015", "51010");
  
      }
  }
  </code></pre>
  
  <p>and after I ran it I have encountered these errors</p>
  
  <pre><code>Nov 30, 2011 12:40:14 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
  INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
  Nov 30, 2011 12:40:15 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
  Nov 30, 2011 12:40:15 PM org.springframework.jdbc.support.SQLErrorCodesFactory &lt;init&gt;
  INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
  Exception in thread "main" org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO PERSON (empID,password) VALUES(?,?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'empID' in 'field list'
      at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:230)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:553)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:738)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:796)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:804)
      at dao.FinanceDao.Add(FinanceDao.java:24)
      at test.TestDrive.main(TestDrive.java:17)
  Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'empID' in 'field list'
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.Util.getInstance(Util.java:386)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
      at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:744)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:537)
      ... 5 more
  </code></pre>
  
  <p>if it would help this is my FinanceDao code</p>
  
  <pre><code>package dao;
  
  import javax.sql.DataSource;
  import javax.sql.DataSource;
  
  import org.springframework.jdbc.core.JdbcTemplate;
  
  import dao.mapper.UserRowMapper;
  import domainmodel.User;
  
  public class FinanceDao implements Manage {
  
      private DataSource ds;
  
      @Override
      public void setDataSource(DataSource ds) {
          this.ds = ds;
  
      }
  
      @Override
      public void Add(String empID, String password) {
          JdbcTemplate Add = new JdbcTemplate(ds);
          Add.update("INSERT INTO PERSON (empID,password) VALUES(?,?)",
          new Object[] { empID, password });
      }
  
      @Override
      public void Delete(String empID , String password) {
          JdbcTemplate Delete = new JdbcTemplate(ds);
          Delete.update("Delete from User where emp_id = '?'",new Object[]{empID});
      }
  
  }
  </code></pre>