File Removed
[csql.git] / test / jdbc / Gateway / test055.ksh
blob4d95bba89859fddb71db22182ffb161507e2f089
1 #!/bin/sh
2 # Connect with connectstring "jdbc:gateway"
3 # Then do (INSERT/UPDATE/DELETE/SELECT) with params statement using gateway statement, when csqlserver is not running
4 # GwTest15.java
5 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
6 REL_PATH=.
7 if [ -s "$TESTFILE" ]
8 then
9 REL_PATH=`pwd`/jdbc/Gateway
11 export CLASSPATH=$CLASSPATH:${REL_PATH}
12 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
13 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
14 isql $DSN < ${REL_PATH}/t1create.sql >/dev/null 2>&1
15 if [ $? -ne 0 ]
16 then
17 rm -f ${REL_PATH}/t1create.sql
18 exit 1;
20 java GwTest15
21 if [ $? -ne 0 ]
22 then
23 exit 2;
26 echo "drop table T1;">${REL_PATH}/dp.sql
27 isql $DSN < ${REL_PATH}/dp.sql >/dev/null 2>&1
28 rm -f ${REL_PATH}/dp.sql
29 rm -f ${REL_PATH}/t1create.sql
31 exit 0;