8 public class TestScript2
{
10 public static void main(String
[] args
)
14 Class
.forName("csql.jdbc.JdbcSqlDriver");
15 Connection con
= DriverManager
.getConnection("jdbc:csql", "root", "manager");
16 Statement cStmt
= con
.createStatement();
17 cStmt
.execute("CREATE TABLE T1 (f1 integer, f2 char (20));");
18 PreparedStatement stmt
= null, selStmt
= null;
19 stmt
= con
.prepareStatement("INSERT INTO T1 VALUES (?, NULL);");
20 for (int i
=0 ; i
< 10 ; i
++) {
26 selStmt
= con
.prepareStatement("SELECT * from T1 ;");
28 //selStmt.setInt(1, i);
29 rs
= selStmt
.executeQuery();
34 System
.out
.print(" NULL");
36 System
.out
.print(" "+ f1
);
37 String f2
=rs
.getString(2);
39 System
.out
.println(" NULL");
41 System
.out
.println(" "+ f2
);
45 cStmt
.executeUpdate("Drop table T1;");
48 System
.out
.println("Exception in Test: "+e
);