converting Informix Online 5.1 esql/c to Dynamic Server esql/c?
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi converting Informix Online 5.1 esql/c to Dynamic Server esql/c? What is the easiest way to do this? Is there a parser that could do this? edward
nitric wrote: > > Hi > > converting Informix Online 5.1 esql/c to Dynamic Server esql/c? > What is the easiest way to do this? > Is there a parser that could do this? No, no parsers. This is relatively trivial assuming you do not want to add 7.xx specific features the code will port with little or no change. The things to watch for are seldom used: o If you use sqlstart() & sqlexit() support for these functions is no longer guaranteed. Replace with CONNECT TO and DISCONNECT SQL statements. o Expressions and aggregates returned INTEGER or FLOAT in 5.xx and 6.xx as appropriate. In 7.xx such expressions return DECIMAL(16.0) or DECIMAL(16) as appropriate. This can only cause a real problem if you use Dynamic SQL to build a data structure on the fly and return it to another function or application which may not be aware of the change in the datatype and length of the returned pseudo-column and may have been coded with some assumptions. This is usually server or middle-ware type code where the client KNOWs what is being returned but the server does not. o If you utilize systables and/or other system catalog tables there have been changes to these. For example fragmented tables report a zero for partnum in systables and the actual partnums of the various fragments are located in sysfragments. That's pretty much it. Features you may want to take advantage of to improve performance without major coding changes: o If you access data from multiple databases without cross-database joins, ESPECIALLY if the external database(s) are on another server or instance, you can improve performance by opening a separate connection to each database and use SET CONNECTION TO to switch connections and databases. This apparently is less disruptive of the library code and connection communications buffers and results in faster processing. In addition the separate connections will access remote servers directly while accessing an external database through a local connection passes all data through the local engine which uses additional local resources therefore multiple connections also reduces the load on the primary server. This can be added to existing code with a few extra lines before each alternation from database to database without modifying the structure of the program. More advanced features: o Multi-threading. This MAY gain you some efficiency for some apps but requires serious rewrite. Maybe phase II or III. 'Nuff said. Art S. Kagel