iodbctest(1)
π iodbctest(1) β iODBC Driver Manager π
okay bestie, so you know how the manual name is iODBC Driver Manager? yeah. that's the whole vibe here. welcome to the demo programs, they're iconic, they're little, they slay π
β¨ NAME β¨
iodbctest, iodbctestw β iODBC Demonstration programs
no cap, that's literally it. two lil demo besties.
πΈ SYNOPSIS πΈ
iodbctest ["DSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]"]
iodbctestw ["DSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]"]
π¦ DESCRIPTION π¦
So. iodbctest and iodbctestw? They're simple ODBC sample programs. And the way they exist is to show off the strength of the ODBC API β like, connecting to literally any ODBC enabled database, issuing SQL commands, and pulling back the query results. main character energy fr fr π
Here's the tea on the difference:
iodbctestuses the standard ODBC API calls to connect using any DSN β but it retrieves all results in ASCII mode.iodbctestwuses the ODBC Unicode API calls to connect using any DSN β and it retrieves all results in Unicode mode. β¨
π OPTIONS π
iodbctest uses the SQLDriverConnect function to make a connection using any available ODBC compliant driver. Which is huge, because it lets you override any ODBC connect attribute in the DSN string. periodt.
Connect strings should start with either a DSN=xxx or a DRIVER=xxxx attribute, optionally followed by other DSN attributes separated by a semicolon. like, for example:
DSN=ora9;UID=scott;PWD=tiger;DATABASE=ora9u
Any attributes required for a proper connection that you did not enter in the DSN connect string must be present in the odbc.ini file. no skipping, bestie, the file has to have them π
Now, quoting rules, listen up:
- If the connect string is passed as an argument to the
iodbctestprogram, the string should be quoted, because most shells use the semicolon as their command separator. (semicolons are little menaces honestly π) - If the connect string is entered on the interactive prompt, no quotes should be used.
Once a successful connection has been established, the user is prompted for a SQL command to be sent to the database. And heads up β a SQL command cannot span multiple lines. one line only, keep it cute π
If the SQL command returns one or more result sets, each result set is fetched using character buffers and displayed in a table. very demure, very table π
π«Ά Special commands, iykyk π«Ά
Additionally, the iodbctest program understands a few special commands:
qualifiersβ Show a list of qualifiers using theSQLTablescatalog call.ownersβ Show a list of owners using theSQLTablescatalog call.tablesβ Show a list of tables using theSQLTablescatalog call.typesβ Show a list of tables types using theSQLTablescatalog call.datatypesβ Show a list of data types using theSQLGetTypeInfocatalog call.reconnectβ Perform a disconnect/reconnect with the information saved during the firstSQLDriverConnect.quit(orexit) β Exit the program and return to the shell. bye bestie π
π EXAMPLES π
π Example the first: get a list of DSNs before making a connection
Start the iodbctest program and get a list of DSNs before making a connection:
$ iodbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor
Enter ODBC connect string (? shows list): ?
DSN | Driver
-----------------------------------------------------------------
ora9 | OpenLink Generic ODBC Driver
mysql | OpenLink Generic ODBC Driver
mysqllite | OpenLink Lite for MySQL
myodbc | MyODBC Driver
pgsql | OpenLink Generic ODBC Driver
tds | OpenLink Generic ODBC Driver
Enter ODBC connect string (? shows list): DSN=ora9;PWD=tiger
Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
SQL>
β Example the second: connect to an Oracle 9 instance
Connect to an Oracle 9 instance which has been previously setup in the odbc.ini file:
$ iodbctest "DSN=ora9;UID=scott;PWD=tiger"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
SQL>select * from emp
ID |NAME
-----------------+-------------------------------------------
1 |Record 1
2 |Record 2
2 |Record 3
result set 1 returned 3 rows.
SQL> quit
π COPYRIGHT π
Copyright Β© 1996-2023 OpenLink Software
π§ AUTHOR π§
iODBC Administrator <iodbc@openlinksw.com>
and that's the whole page bestie, no notes, we ate π β¨
version 3.52.16 Β· dated 3 August 2005 Β· kisses from the iODBC Driver Manager crew, mwah π«Άπ
π¦ where this page comes from
- arch rolling: libiodbc 3.52.16-3 Β· LGPL-2.0-or-later
- epel 10: libiodbc 3.52.16-1.el10_1 Β· LGPL-2.0-only OR BSD-3-Clause
- fedora 43: libiodbc 3.52.16-3.fc43 Β· LGPL-2.0-only OR BSD-3-Clause
- fedora 43: libiodbc 3.52.16-3.fc43 Β· LGPL-2.0-only OR BSD-3-Clause
- fedora 44: libiodbc 3.52.16-4.fc44 Β· LGPL-2.0-only OR BSD-3-Clause
- fedora 44: libiodbc 3.52.16-4.fc44 Β· LGPL-2.0-only OR BSD-3-Clause
- nixos 26.05: libiodbc 3.52.16
- nixpkgs unstable: libiodbc 3.52.16
- opensuse-leap 16.0: iodbc 3.52.16-bp160.1.13 Β· BSD-3-Clause OR LGPL-2.0-only
- opensuse-leap 16.0: iodbc 3.52.16-bp160.1.13 Β· BSD-3-Clause OR LGPL-2.0-only
- opensuse-leap 16.0: iodbc 3.52.16-bp160.1.13 Β· BSD-3-Clause OR LGPL-2.0-only
- opensuse-leap 16.0: iodbc 3.52.16-bp160.1.13 Β· BSD-3-Clause OR LGPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms