JDBC Checker

From MediaWiki

Revision as of 18:10, 31 January 2008 by Dusan (Talk | contribs)
Jump to: navigation, search

This is a simple way of checking compatibility between JDBC driver and database with Ant. Ant has integrated support for access to SQL databases which is used by following build file

  [dusan@woodoo JDBCChecker]$ cat build.xml
  <project name="JDBC Checker"
           default="check"
           basedir=".">
  <description>
      ANT build file which allows to check compatibility 
      between JDBC driver and database.
  </description>
  <target name="check">
  	   <sql driver="<insert JDBC URL>"
   	      onerror="stop"
           url="<insert connection URL>"
           userid="<insert user name>"
           password="<insert password>">
           <classpath>
              <pathelement path="<insert path to JDBC driver here>"/>
           </classpath>
           select * from tab;
           </sql>
  </target>
  </project>
Personal tools