File Removed
[csql.git] / test / jdbc / Gateway / test053.ksh
blob2b4937dc6de91c0294fc83c9d2ead1f3a825ad4b
1 #!/bin/sh
2 # Connect with connectstring "jdbc:gateway"
3 # CREATE TABLE T1 (f1 integer, f2 smallint, f3 tinyint,f4 bigint, f5 float, f6 char(10), f7 date, f8 time, f9 timestamp);
4 # insert 9 tuples with params for all fields (INSERT INTO T1 values (?,?,?,?,?,?,?,?,?))
5 # select tuple with WHERE clause having param for each fields(SELECT * FROM T1 WHERE f1=?, SELECT * from T1 where f2=?)
6 # GwTest13.java
8 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
9 REL_PATH=.
10 if [ -s "$TESTFILE" ]
11 then
12 REL_PATH=`pwd`/jdbc/Gateway
14 export CLASSPATH=$CLASSPATH:${REL_PATH}
15 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
16 echo "CREATE TABLE T1 (f1 integer, f2 smallint, f3 tinyint, f4 bigint, f5 float, f6 char(10), f7 date, f8 time, f9 timestamp);" >${REL_PATH}/t1create.sql
17 isql $DSN < ${REL_PATH}/t1create.sql >/dev/null 2>&1
18 if [ $? -ne 0 ]
19 then
20 rm -f ${REL_PATH}/t1create.sql
21 exit 1;
23 java GwTest13
24 if [ $? -ne 0 ]
25 then
26 exit 2;
29 echo "drop table T1;">${REL_PATH}/dp.sql
30 isql $DSN < ${REL_PATH}/dp.sql >/dev/null 2>&1
31 rm -f ${REL_PATH}/dp.sql
32 rm -f ${REL_PATH}/t1create.sql
34 exit 0;