1 ----------------------------------README---------------------------------------
2 This contains an example program that demonstates usage of jdbc interface.
6 It creates table T1 with two fields f1 integer and f2 string.
7 Creates index on f1 field of T1 table.
8 Inserts 10 rows into the table T1, 1 insert per transaction
9 Update all rows where f1 field have even numbers
10 Delete all rows where f1 value is 0,3,6,9
11 Select rows with f1 value 0 to 9 and displays
16 1. Make a copy of this directory in a writable area
17 2. Edit the Makefile and set the JAVAC variable to point to the javac
18 compiler on your system.
19 3. Use the make command to compile
24 1. Set the CSQL_CONFIG_FILE environment variable to absolute path of csql.conf file.
25 $export CSQL_CONFIG_FILE=/tmp/csql.conf
26 2. Set the LD_LIBRARY_PATH environment variable to csql library path
27 $export LD_LIBRARY_PATH=$CSQL_INSTALL_ROOT/lib:$LD_LIBRARY_PATH
29 3. Set the CLASSPATH environment variable to csql jdbc jar
30 $export CLASSPATH=.:$CLASSPATH:$CSQL_INSTALL_ROOT/lib/CSqlJdbcDriver.jar
31 4. Run the class file created by make
34 Note: For running gateway example , makesure that you configure csql.conf and csqltable.conf with appropriate values. Add 1:t1 in the csqltable.conf and create table t1 in MySQL using isql tool as follows
36 SQL>CREATE TABLE t1 (f1 integer, f2 char (196), primary key(f1));
39 Refer usermanual for more information on how to configure caching for MySQL.
44 Index created on T1 (f1)
45 Total Rows inserted 10