Re: ESQL/C 5.00 to SE 7.23 - can I use 7.23 SQL?
Posted in 1998
Peter Lancashire wrote: > > I have a bought-in program, part of which interrogates an Informix > database. It was built with ESQL/C version 5.00 and connects to a 7.23 > SE database. It uses the relay module and has so far worked fine for > simple things. It sends only (dynamic) SELECT statements and needs to > interpret the names and types of columns returned in the select list. > > Can I use features from version 7.23 in these SELECT statements or will > the old 5.0 ESQL code not parse them correctly? Specifically, will it > cope with functions (eg TRIM) and expressions (eg s || t) introduced > after 5.0? > > Yes, I know I could experiment, but a knowledge of the underlying rule > is much more reassuring than experiments. Mind you, this is software, > not physics ... :-) > > I suppose what I am really asking is: how do the client and database > engine share out the SQL parsing and host variable connection work? When you put it that way... The engine does all of the work in parsing an SQL statement and determining the names, types, and sizes of the columns returned. The exception is if you create your own sqlda structure and open the query USING that structure then the engine will defer to your data types and sizes and return the data converted accordingly. Why not just recompile the 5.xx code using the 7.23 ESQL compiler. The source is forward compatible. Then you can add all of the 7.xx features that you want and do away with the, very slow, relay module to boot. ESQL/C 7.23 compiled programs will outperform 5.xx compiled programs against both 5.xx and 7.xx engines. I've tested it. Art S. Kagel