[DB-SIG] How to connect to informix DB in an easy way

Carsten Haese carsten.haese at gmail.com
Sat Aug 22 07:06:08 CEST 2009


On Fri, Aug 21, 2009 at 9:52 AM, M. Hecht <mhecht2909 at instant-mail.de>wrote:

>
> Hmmm ....
>
> meanwhile I tried to find something in the proposed documentation but
> failed.
>
> What I have is a Network Address, Port, DB-Server-Name and DB-Name since on
> the computer are
> running several databases.
>
> This is what I tried to describe with the JAVA connection string:
>
> jdbc:informix-sqli://address:port/dbName:informixserver=dbServerName
>

The Python module is based on ESQL/C, which uses an entirely different
philosophy than JDBC. You can't expect to be able to translate a JDBC
connection string into an ESQL/C CONNECT statement.

There is NOTHING appropriate in the proposed documentation. Only this here:
>
>  ... 'database at server' ...
>
> so database is clearly the database and server is the network address. But
> where can I enter the port and the dbServerName???
>
> I tried something like this
>
> connect('dbServerName at ipAddress:Port' ...
> connect('dbName at ipAddress:Port' ...
>
> but with both I get the error message
>
> ...  The INFORMIXSERVER value is not listed in the sqlhosts file or the
> Registry ...
>
> Do you have any suggestion?


ESQL/C applications don't connect directly to IP-Address/Port combinations.
They connect to abstractly defined servers that are defined in the sqlhosts
file. Information about how to write an sqlhosts file can be found on Google
by searching for "Informix sqlhosts file."

-Carsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/db-sig/attachments/20090822/68e64760/attachment-0001.htm>


More information about the DB-SIG mailing list