title: How do I make a HSQLDB 2 client program?
body: <p>I have a small HSQLDB program to test bits of SQL.  I am getting this error:</p>
  
  <pre><code> A pre-version 2.0 client attempted to connect.  We rejected them.
  </code></pre>
  
  <p>Yet the only JDBC driver I have is the HSQLDB v2.3 in the most recent download:</p>
  
  <pre><code>hsqldb/lib/hsqldb.jar
  </code></pre>
  
  <p>I'm using this string to load the JDBC driver:</p>
  
  <pre><code> Class.forName("org.hsqldb.jdbcDriver");
  </code></pre>
  
  <p>And the connection string is:</p>
  
  <pre><code> connectionStr = "jdbc:hsqldb:hsql://localhost/tmp_db";
   user=sa, password=
  </code></pre>
  
  <p>Default values.  My HSQLDB server seems to have started OK with a database as follows:</p>
  
  <pre><code> server.dbname.0=**tmp_db**
   server.database.0=file:r:/.data/hsqldb/**tmp_db/tmp**
  [Server@372f7a8d]: Database [index=2, id=2, db=file:r:/.data/hsqldb/**tmp_db/tmp**, alias=tmp_db] opened sucessfully in 26 ms.
  </code></pre>
  
  <p>I'm using Netbeans and when I connect via the Services tab, the database seems to be opening OK.  Wouldn't Netbeans be using the same driver?  Can I check that?</p>
  
  <p>The big question is how do we specify the version 2 client connection, driver or parameters?  Must I get a different JAR for the correct driver?</p>
  
  <p>One last thing.  The test program works fine if I use a file based connection, such as:</p>
  
  <pre><code>jdbc:hsqldb:db_file
  </code></pre>
  
  <p>Frustratingly too, the server connection string seemed to be working earlier today.  At least I could drop/create tables while I was making changes. </p>