lock manager and chunk allocation mutex modificationsw
[csql.git] / test / jdbc / Gateway / Procedure01.java
blobc84e7b02bac399b65c3a76f15a6e151998ad2c88
1 //Call Procedure through gateway
4 import java.sql.*;
5 public class Procedure01
6 {
7 public static void main(String[] args)
8 {
9 try
11 Class.forName("csql.jdbc.JdbcSqlDriver");
12 Connection con = DriverManager.getConnection("jdbc:adapter", "root", "manager");
13 if ( con == null ) System.exit(1);
14 CallableStatement cs=null;
15 if(System.getenv("DSN").equals("oracle")){
16 cs = con.prepareCall("{ call CsqlRef.InParamSelect(?) }");
18 else{
19 System.out.println("mysql");
20 cs = con.prepareCall("{ call InParamSelect(?) }");
22 cs.setInt(1, 15);
23 ResultSet rs = cs.executeQuery();
24 System.out.println("F1"+" F2");
25 System.out.println("-------------");
26 while(rs.next())
28 System.out.println(rs.getInt(1)+" "+rs.getInt(2));
30 rs.close();
31 con.close();
32 System.exit(0);
33 }catch(Exception e) {
34 System.out.println("Exception in Test: "+e);
35 e.getStackTrace();
36 System.exit(1);