1.nh
2.TH iodbctest 1 "3 August 2005" "@VERSION@" "@PACKAGE_NAME@"
3
4.SH NAME
5iodbctest, iodbctestw \- iODBC Demonstration programs
6
7.SH SYNOPSIS
8.B iodbctest
9.RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ]
10.br
11.B iodbctestw
12.RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ]
13
14.SH DESCRIPTION
15The \fBiodbctest\fR program and \fBiodbtestw\fR programs are simple ODBC
16sample programs, showing the strength of the ODBC API to connect to any
17ODBC enabled database, issue SQL commands and retrieve the query results.
18
19The \fBiodbctest\fR program uses the standard ODBC API calls to connect
20using any DSN, but retrieves all results in ASCII mode.
21
22The \fBiodbctestw\fR program uses the ODBC Unicode API calls to connect
23using any DSN, and retrieves all results in Unicode mode.
24
25.SH OPTIONS
26The \fBiodbctest\fR program uses the SQLDriverConnect function to make
27a connection using any available ODBC compliant driver. This allows the
28user to override any ODBC connect attribute in the DSN string.
29
30Connect strings should start with either a \fIDSN=xxx\fR or a
31\fIDRIVER=xxxx\fR attribute optionally followed by other DSN attributes
32separated by a semicolon e.g:
33
34.nf
35	DSN=ora9;UID=scott;PWD=tiger;DATABASE=ora9u
36.fi
37
38Any attributes required for a proper connection that are not entered in
39the DSN connect string, must be present in the odbc.ini file.
40
41If the connect string is passed as an argument to the \fBiodbctest\fR
42program, the string should be quoted as most shells use the semicolon
43as their command separator. If the connect string is entered on the
44interactive prompt, no quotes should be used.
45
46After a successfull connection has been established, the user is prompted
47for a SQL command to be send to the database. A SQL command cannot span
48multiple lines.
49
50If the SQL command returns one or more result sets, each result set is
51fetched using character buffers and displayed in a table.
52
53Additionally, the \fBiodbctest\fR program understands a few special
54commands:
55
56.TP 8
57.B qualifiers
58.br
59Show a list of qualifiers using the SQLTables catalog call.
60
61.TP 8
62.B owners
63.br
64Show a list of owners using the SQLTables catalog call.
65
66.TP 8
67.B tables
68.br
69Show a list of tables using the SQLTables catalog call.
70
71.TP 8
72.B types
73.br
74Show a list of tables types using the SQLTables catalog call.
75
76.TP 8
77.B datatypes
78.br
79Show a list of data types using the SQLGetTypeInfo catalog call.
80
81.TP 8
82.B reconnect
83.br
84Perform a disconnect/reconnect with the information saved during the
85first SQLDriverConnect.
86
87.TP 8
88.B quit (or exit)
89.br
90Exit the program and return to the shell.
91
92.SH EXAMPLES
93Start the iodbctest program and get a list of DSNs before making a
94connection:
95
96.nf
97    $ iodbctest
98    OpenLink ODBC Demonstration program
99    This program shows an interactive SQL processor
100
101    Enter ODBC connect string (? shows list): ?
102
103    DSN                              | Driver
104    -----------------------------------------------------------------
105    ora9                             | OpenLink Generic ODBC Driver
106    mysql                            | OpenLink Generic ODBC Driver
107    mysqllite                        | OpenLink Lite for MySQL
108    myodbc                           | MyODBC Driver
109    pgsql                            | OpenLink Generic ODBC Driver
110    tds                              | OpenLink Generic ODBC Driver
111
112    Enter ODBC connect string (? shows list): DSN=ora9;PWD=tiger
113    Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
114
115    SQL>
116.fi
117
118Connect to an Oracle 9 instance which has been previously setup in the
119odbc.ini file:
120
121.nf
122    $ iodbctest "DSN=ora9;UID=scott;PWD=tiger"
123    iODBC Demonstration program
124    This program shows an interactive SQL processor
125    Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
126
127    SQL>select * from emp
128
129    ID               |NAME
130    -----------------+-------------------------------------------
131    1                |Record 1
132    2                |Record 2
133    2                |Record 3
134
135     result set 1 returned 3 rows.
136
137    SQL> quit
138.fi
139
140.SH COPYRIGHT
141Copyright \(co 1996-2005 by OpenLink Software
142
143.SH AUTHOR
144iODBC Administrator <iodbc@openlinksw.com>
145