added icsql tool with no dependency on readline libraryw
[csql.git] / demo / gateway / odbc / README
blob37f6f0c809d614c65f71b384097f5407dfccb3c5
1 ----------------------------------README---------------------------------------
2 This contains an example program that demonstrates usage of odbc interface through gateway on cached table.
5 What it does?
6 -------------
7 It inserts 10 rows in cached table t1.
8 Select rows with f1 value 51 to 60 and displays
11 How to compile
12 ----------
13 Use the make command to compile
15         $ make
17 How to run
18 ----------
19 1. Set CACHE_TABLE=true in csql.conf file
21 2. Set the necessary enviroment variables using the setup script
22    under the csql root directory
24         $ . ./setupenv.ksh
26 3. Add an entry into csqlds.conf using csqlds tool mentioned as below.
28     $ csqlds -U <tdbusername> -P <password> -D <dsnname> -N <tdbname> -a
30 Note# tdb->target database
32 4. Start the server
34     $  csqlserver
36 5. Create table t1 with two fields f1 integer(primary key) and f2 char(10) in mysql and cache the table.
38         $ cachetable -t t1
40 6.  Run the class file created by make
41         $ ./GwStmt
43 Output of example:
44 ------------------
45 Connected to the Data Source SUCCESSFULLY..
46 Total row inserted=10
47 Fetching starts on table  t1 :
48  F1=51  F2=Praba
49  F1=52  F2=Praba
50  F1=53  F2=Praba
51  F1=54  F2=Praba
52  F1=55  F2=Praba
53  F1=56  F2=Praba
54  F1=57  F2=Praba
55  F1=58  F2=Praba
56  F1=59  F2=Praba
57  F1=60  F2=Praba
58  Total row fetched=10