Operating System - HP-UX
1752615 Members
4463 Online
108788 Solutions
New Discussion юеВ

Re: Configuration for Informix connection using SQLDriverConnect.??

 
SOLVED
Go to solution
Suhas_3
Advisor

Configuration for Informix connection using SQLDriverConnect.??

Hi,
Can anyone help regarding connecting to Informix database using SQLDriverConnect api? The client and server are on same machine.
I have following setup to proper values -
INFORMIXSERVER, INFORMIXDIR, ONCONFIG.
I am able to run dbaccess utility properly.
I am running the informix demo program, which gives me following error
when executed.
================================= error ====================
ERROR: -11041: IM002 : [Informix][Informix ODBC Driver]Data source name
not found and no default driver specified.
Error in Step 1 -- SQLDriverConnect failed
Exiting!!
===========================================================

What is the environment setup required, and what are the files required
to get the connectivity? Any configuration is required?
I am working on Informix dynamic server 9.30 with informix client SDK
2.60
Thanks in advance for the help.

Suhas
4 REPLIES 4
Rainer von Bongartz
Honored Contributor

Re: Configuration for Informix connection using SQLDriverConnect.??


How did you configure your database?

Did you define a socket connection in $ONCONFIG and in your SQLHOSTS file ???

Otherwise no ODBC connection will be possible .


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Suhas_3
Advisor

Re: Configuration for Informix connection using SQLDriverConnect.??

Hi Rainer
Yes, the sqlhosts entry is ok. I am listing it below :
eu_dev_9_3 group - - i=1032
eu_dev_9_3soc onsoctcp fluffy informixdev2 g=eu_dev_9_3
eu_dev_9_3shm onipcshm fluffy null1 g=eu_dev_9_3
endgroup group - - e=eu_dev_9_3

Also the ONCONFIG is defined properly the value is onconfig.eu_dev_9_3

the machine name is fluffy. The server is running and as I mentioned, I am able to connect server using dbaccess utility.

thanks,
Suhas
Rainer von Bongartz
Honored Contributor
Solution

Re: Configuration for Informix connection using SQLDriverConnect.??

Suhas,

Your connection to the engine using dbaccess is not using the socket connection required for ODBC.

dbaccess uses the ipcshm connection.

check your odbc.ini files as mentions in the explanation of error 11041.

see

This Informix CLI error code is the same as SQLSTATE value IM002. The
following functions can return this error code: SQLBrowseConnect(),
SQLConnect(), and SQLDriverConnect().

One of the following problems occurred: (1) The function cannot find the
initialization file, or (2) The data source that the szConnStrn string
specified does not exist in the initialization file, and a default driver
specification does not exist. Make sure that the initialization file exists.
Add the specified data source to the initialization file or create a default
driver specification.


-11041 Data source name not found and no default driver specified.

The data source name specified in the connection request is not found
in the ODBC.INI file or registry, and there is no default driver
specification. Confirm that the data source name is registered. You can
also provide a default data source.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Suhas_3
Advisor

Re: Configuration for Informix connection using SQLDriverConnect.??

Hi Rainer,

Thanks for the help. I am working with the information that oyu age.

One question that I have is, does the odbc driver of Informix come with standard Client SDK installation or do we have to purchase / download it seperately? If we need to download - is it the free download and what is the site? Or if the driver comes with standard client SDK installation - what is the path and name of the driver?

Thanks again for the help.

Suhas