Unable to connect to Informix from an ASP.NET application

I installed a trial version of IBM Informix Dynamic Server 11.50 on my development laptop for use with the ASP.NET 2.0 application that I am writing. I created a couple of databases and populated them with sample data, but I can’t connect. This is the relevant section of code:

Dim facStr As String = System.Configuration.ConfigurationManager.ConnectionStrings("fact").ConnectionString  
conn.ConnectionString = facStr
Try
    conn.Open()
Catch ex As Exception

The exception is:

[Informix.NET provider] [Informix] The ol_srv_custom server is not specified as the dbserver name in sqlhosts.

Full path to sqlhosts file:

C: \ Archivos de programa \ IBM \ Informix \ Client-SDK \ etc \ sqlhosts

Informix environment variables:

INFORMIXSQLHOSTS = C: \ Archivos de programa \ IBM \ Informix \ Client-SDK \ etc \ sqlhosts

The contents of the sqlhosts file:

ol_srv_custom olsoctcp * nb-desarrollo svc_custom

Connect string:

** Host = * -Desarrollo; = svc_custom; Server = ol_srv_custom; Database = ; = informix; = **********

?


ODBC . DSN, " " , . , , Informix, - dbaccess, INSERTed . , - SO, , ServerFault , , , .

+3
1
+2

Source: https://habr.com/ru/post/1754429/


All Articles