<docbook><section><title>CannotUseDatabaseCommandsInAExplicitDatabaseConnection</title><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2">Error Messages (C)</bridgehead>
<para><ulink url="UDAErrorMessages">A</ulink> <ulink url="ErrorMessagesB">B</ulink> <ulink url="ErrorMessagesC">C</ulink> <ulink url="ErrorMessagesD">D</ulink> <ulink url="ErrorMessagesE">E</ulink> <ulink url="ErrorMessagesF">F</ulink> <ulink url="ErrorMessagesG">G</ulink> <ulink url="ErrorMessagesH">H</ulink> <ulink url="ErrorMessagesI">I</ulink> <ulink url="ErrorMessagesJ">J</ulink> <ulink url="ErrorMessagesK">K</ulink> <ulink url="ErrorMessagesL">L</ulink> <ulink url="ErrorMessagesM">M</ulink> <ulink url="ErrorMessagesN">N</ulink> <ulink url="ErrorMessagesO">O</ulink> <ulink url="ErrorMessagesP">P</ulink> <ulink url="ErrorMessagesQ">Q</ulink> <ulink url="ErrorMessagesR">R</ulink> <ulink url="ErrorMessagesS">S</ulink> <ulink url="ErrorMessagesT">T</ulink> <ulink url="ErrorMessagesU">U</ulink> <ulink url="ErrorMessagesV">V</ulink> <ulink url="ErrorMessagesW">W</ulink> <ulink url="ErrorMessagesX">X</ulink> <ulink url="ErrorMessagesY">Y</ulink> <ulink url="ErrorMessagesZ">Z</ulink> <ulink url="ErrorMessagesSymbols">#</ulink></para><bridgehead class="http://www.w3.org/1999/xhtml:h3">Cannot use database commands in a explicit database connection</bridgehead>
<para>&quot;Cannot use database commands in a explicit database connection&quot; errors are returned by the Informix server if you attempt to perform an Informix server database command in a explicit database connection.
 Examples of an Informix server database command are:</para><programlisting>  DATABASE
      &lt;DBNAME&gt;
      -- changes current database
       CREATE DATABASE &lt;DBNAME&gt; -- creates a new
      database
</programlisting><para> Such commands can not be used if you&#39;ve already explicitly connected to a database.
 An explicit connection has been made if a specific database has been passed to the DATABASE field of the ODBC DSN.</para><para>To implicitly connect to an Informix server (as opposed to a specific database on the server), you need to set the DATABASE field as:</para><programlisting>   @server
</programlisting><para> where server is the entry in the sqlhosts file you want to connect to.
 The sqlhosts file will be located at:</para><programlisting>  $INFORMIXDIR/etc/sqlhosts
</programlisting><para> Typically, the sqlhosts file has several lines which reference any number of (remote or local) Informix servers that may be connected to.
 Each line has this format:</para><programlisting>   #Dbserver Protocol Hostname
      Port 
</programlisting><para> For example:</para><programlisting>  iif930 onsoctcp apollo2 1530
</programlisting><para> This entry refers to a &quot;iif930&quot; server on the host &quot;apollo2&quot;.
 The &quot;iif930&quot; server is started up in sockets mode, with connections made via TCP Port 1530.
 (Note: the Port value can also be a reference to an entry in the /etc/services file.) To connect to this server, I would pass &quot;@iif930&quot; to the DATABASE field of the DSN.</para><bridgehead class="http://www.w3.org/1999/xhtml:h3">Evidence</bridgehead>
<para>Request Broker Log</para></section></docbook>