Re: Informix-CLI Big Hoax identical to ODBC
Posted in 1997
>From: "Peries, Chaminda" <CPeries@dynasty.com> >Date: Tue, 17 Jun 1997 17:00:44 -0500 >X-Informix-List-Id: <list.15047> > >Hi guys ! I need some help again > >I tried to use the Informix call interface (CLI) to write some >programs. I discovered that it is identical to ODBC. In fact it shares >the same set of header files as ODBC. ie:- sql.h and sqlext.h (these >files come with odbc). I dont see any difference between CLI and ODBC. > >Am I missing anything or is this the case. I'm feeling some trepidation stepping in to waters where there may be sharks lurking out of sight... As I understand it, Informix-CLI is an ODBC Driver for accessing Informix databases. Informix-CLI is invoked by some ODBC Driver Manager when the ODBC application connects to a data source which requires an Informix ODBC Driver. >Is there ANY advantage to using CLI vs ODBC. The only advantage to using I-CLI directly is that you reduce the calling path length by skipping the Driver Manager code which normally relays function calls from the ODBC application to the Driver. However, if you link direct to Informix-CLI, you lose the possibility of talking to non-Informix databases. Also, if your code uses obsolescent function calls (eg SQLSetParam instead of SQLBindParameter), you may find that the I-CLI library does not provide the old function because the Driver Manager normally provides the SQLSetParam function and converts it into an SQLBindParameter call in the driver. In other words, you should not use the I-CLI directly; you should go through the ODBC Driver Manager. TTBOMK (to the best of my knowledge). On the other hand, connecting to an Informix database without using I-CLI means you have to have someone else's ODBC Informix Driver to do the talking. I think you'll find that the I-CLI implementation is faster than anybody else's simply because it doesn't go through the ESQL/C interface that other implementors would use; it dives one level deeper. >I would also like to know if there is any difference between these two. I've discussed the differences above. >When Informix refers to the driver manager does it refer to the ODBC >driver manager or does it have its own. No, Informix does not have its own ODBC Driver Manager. >If so what is it ? ( .dll name ok) N/A >I ask this because, when I install CLI the driver is visible through the >ODBC manager. As indeed it should be. >I would appreciate it very much if someone could put me on the right track. I hope I'm pointing you in the right direction. I've been working with I-CLI and ODBC Driver Managers on Unix, where Microsoft is not the purveyor of the ODBC Driver Manager. What I've said above applies to Unix, and I don't think I've led you astray for the Unix environment. On Windows 95/NT, Microsoft provides the ODBC Driver Manager of course, and Informix-CLI is, to the best of my understanding, the Informix ODBC Driver for use with the MS ODBC Driver Manager. If someone knows that what I've said is completely screwball, perhaps they'd be kind enough to enlighten me, and everybody on the c.d.i list who I've unintentionally led astray. Yours tentatively, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>