<docbook><section><title>TestingMacODBCDSNs</title><title> Testing ODBC DSNs on Mac OS X, with iODBCTest </title> Testing ODBC DSNs on Mac OS X, with iODBCTest 
<para>This is a simple &#39;C&#39; based and ODBC compliant Interactive SQL processor.
</para><orderedlist spacing="compact"><listitem> Launch iODBCTest by double-clicking the <computeroutput>iODBC Test.command</computeroutput> script found in <computeroutput>/Applications/iODBC/</computeroutput>.
 Alternatively, you can open a Terminal session, and execute this command: <programlisting>&quot;/Applications/iODBC/iODBC Test.command&quot;
</programlisting></listitem>
<listitem> When prompted for a connect string, you can enter &quot;?&quot; to see a list of ODBC DSNs on your machine, or immediately enter a valid ODBC Connect String following the form -- <programlisting>DSN=&lt;dsn name&gt;[;UID=&lt;username&gt;[;PWD=&lt;password&gt;]][;&lt;connect string attribute&gt;=&lt;value&gt;]
</programlisting>If you have an Oracle DSN named &quot;Marketing&quot;, you might enter: <programlisting>DSN=Marketing;UID=scott;PWD=tiger
</programlisting><itemizedlist mark="bullet" spacing="compact"><listitem> Note: If there is a username but no password, you must include a semicolon at the end: <programlisting>DSN=Marketing;UID=sa;PWD=;
</programlisting></listitem>
</itemizedlist></listitem>
<listitem> 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 -- <itemizedlist mark="bullet" spacing="compact"><listitem> <computeroutput>datatypes</computeroutput> </listitem>
<listitem> <computeroutput>owners</computeroutput> </listitem>
<listitem> <computeroutput>qualifiers</computeroutput> </listitem>
<listitem> <computeroutput>tables</computeroutput> </listitem>
<listitem> <computeroutput>types</computeroutput> </listitem>
</itemizedlist></listitem>
<listitem> The following example shows a connection to Microsoft SQL Server 2000, making a simple query against the sample Northwind database: <programlisting>[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&gt;select au_lname, au_fname, state from authors where au_id &lt; &#39;333-33-3333&#39;
au_lname                                |au_fname            |state
----------------------------------------+--------------------+-----
White                                   |Johnson             |CA
Green                                   |Marjorie            |CA
Carson                                  |Cheryl              |CA
O&#39;Leary                                 |Michael             |CA
Straight                                |Dean                |CA
 5 row(s) fetched.

SQL&gt;quit
Again (y/n) ? n

Have a nice day.
[localhost:~] openlink%
</programlisting> </listitem>
</orderedlist></section></docbook>