title: Relation Data with Spring ODBC Driver
body: <p>I'm trying to insert the the following contents into my messages table:
  (title : title, content: this is the content)
  I'm using the following code:</p>
  
  <pre><code>    package main;
  
  
  
  import org.springframework.jdbc.core.JdbcTemplate;
  import org.springframework.jdbc.datasource.DriverManagerDataSource;
  
  
  public class Application {
  
  
  
          public static void main(String[] args)
          {
  
              DriverManagerDataSource ds = new DriverManagerDataSource();
              ds.setDriverClassName("sun.jdbc.odbc.JdbcOdbcDriver");
              ds.setUrl("jdbc:odbc:test");
              ds.setUsername("user");
              ds.setPassword("pass");
  
  
  
              JdbcTemplate conn = new JdbcTemplate(ds);
  
              conn.execute("INSERT INTO messages VALUES ('title','this is the content')");
  
  
          }
  }
  </code></pre>
  
  <p>This is the exception message: </p>
  
  <pre><code>    15:02:09.482 [main] INFO  o.s.j.d.DriverManagerDataSource - Loaded JDBC driver: sun.jdbc.odbc.JdbcOdbcDriver
  15:02:09.516 [main] DEBUG o.s.jdbc.core.JdbcTemplate - Executing SQL statement [INSERT INTO messages VALUES ('title','content')]
  15:02:09.530 [main] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
  15:02:09.531 [main] DEBUG o.s.j.d.DriverManagerDataSource - Creating new JDBC DriverManager Connection to [jdbc:odbc:test]
  Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
      at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:386)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:435)
      at main.Application.main(Application.java:26)
  Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
      at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
      at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
      at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
      at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
      at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:155)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:120)
      at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
      at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
      ... 3 more
  </code></pre>
  
  <p>I've used the following tutorial to do my work:
  <a href="http://www.javabeat.net/qna/196-spring-framework-working-with-database/" rel="nofollow">http://www.javabeat.net/qna/196-spring-framework-working-with-database/</a></p>
  
  <p>Is it possible that the name of the driver has changed?
  I'm sure this question has a 3 word answer.
  Thank you.</p>