%META:TOPICPARENT{name="InstallConfigODBC"}% = Testing ODBC DSNs on Mac OS X, with iODBCTest = This is a simple 'C' based and ODBC compliant Interactive SQL processor. # Launch iODBCTest by double-clicking the {{{iODBC Test.command}}} script found in {{{/Applications/iODBC/}}}. Alternatively, you can open a Terminal session, and execute this command: {{{ "/Applications/iODBC/iODBC Test.command" }}} # When prompted for a connect string, you can enter "?" to see a list of ODBC DSNs on your machine, or immediately enter a valid ODBC Connect String following the form -- {{{ DSN=[;UID=[;PWD=]][;=] }}} If you have an Oracle DSN named "Marketing", you might enter: {{{ DSN=Marketing;UID=scott;PWD=tiger }}} #* Note: If there is a username but no password, you must include a semicolon at the end: {{{ DSN=Marketing;UID=sa;PWD=; }}} # Once connected, any valid SQL or ODBC command may be executed through this interface. You can also call on several built-in functions, which interrogate the back-end for -- #* {{{datatypes}}} #* {{{owners}}} #* {{{qualifiers}}} #* {{{tables}}} #* {{{types}}} # The following example shows a connection to Microsoft SQL Server 2000, making a simple query against the sample Northwind database: {{{ [localhost:~] openlink% /Library/iodbc/bin/odbctest iODBC Demonstration program This program shows an interactive SQL processor Enter ODBC connect string (? shows list, or DSN=...): DSN=northwind;UID=sa;PWD=admin SQL>select au_lname, au_fname, state from authors where au_id < '333-33-3333' au_lname |au_fname |state ----------------------------------------+--------------------+----- White |Johnson |CA Green |Marjorie |CA Carson |Cheryl |CA O'Leary |Michael |CA Straight |Dean |CA 5 row(s) fetched. SQL>quit Again (y/n) ? n Have a nice day. [localhost:~] openlink% }}}