Re: Is ESQL my only option ??
Posted in 1995
zzz6351@epx.cis.umn.edu (Information Advantage) wrote: > >Informix has not come out with any kind of API yet. I wrote my own database >access functions using ESQL/C and then used that as an aPI for the rest of my >code. > >Kurt Mehlhoff >kurt@infoadv.mn.org Hello Kurt, I'm thinking about the same solution that you suggest above. But I have one problem with it. How should I implement functions f'r the select statement. I know that I can use dynamic ESQL/C to detect the structure of a table at runtime. This is not the problem. But I need a general way to build the SELECT-statement at runtime for different databases. My first thougth was the implementation of the following functions: init_search(tabname, wherepart, orderpart) getnext_search( &record ); close_search(); With these simple calls you can even implement a non-SQL-database (i.e. flat ascii files for very small programs), but on the other hand, you don't have the full power of SQL. For example it is diffcult to build joins over many tables on different servers. So I thought, that I can reduce all select statements with more than 1 table to many select-statements with only 1 table. But in a client-server environment, this is not the best solution, because the network traffic will grow rapdily. Many jobs, which can be done by the database server, must be done in my C-API. So I think, that this is not the right way... Which experiences do you have made with your C-API??? Do you miss SQL??? Can you give me a hint about your functions for selecting data out of tables??? Any hints are welcome. Many thanks in advance... Dirch +----------------------------------------------------------------------------+ | Dirch Scheer email: scheer@stadt-mh.de | | Amt 10-3 Tel. : +49 208 455 1006 | | Stadtverwaltung (snail-)Mail : Ruhrstr. 32 | | Muelheim an der Ruhr D-45468 Muelheim an der Ruhr | +----------------------------------------------------------------------------+