testing failed systests after bug fixes
[csql.git] / tmptest / jdbc / selectT1.java
bloba3a3ce8ae0a85ca070ea187503561baf88ea05b4
1 import java.sql.*;
3 public class selectT1
5 public static void main( String argv[] )
7 try
9 // Load JDBC driver
10 Class.forName("csql.jdbc.JdbcSqlDriver");
12 // Connect to CSQL
13 Connection con = DriverManager.getConnection("jdbc:csql", "root", "manager");
15 // Insert Tuples
16 Statement stmt = con.createStatement();
17 ResultSet rs = stmt.executeQuery( "SELECT * FROM t1" );
18 while( rs.next() )
20 System.out.println( rs.getInt(1) + ", " + rs.getInt(2) );
22 rs.close();
23 con.commit();
24 stmt.close();
26 // Disconnect from CSQL
27 con.close();
29 } catch(Exception e) {
30 System.out.println("selectT1: " + e );
31 e.getStackTrace();