Re: Info on non-embedded SQL from C
Posted in 1993
bjaspan@Aktis.COM (Barry Jaspan) writes: : I have a C program that generates standard SQL (**) at run time based on user : input and executes against a preexisting database. It is currently : implemented to use Sybase, although I designed it (hopefully) to allow other : SQL engines to be used easily. All I need from the RDBMS is the ability to : execute a single SQL SELECT statement and read the resuling rows back. In : Sybase, I can do this by building a null-terminated C string with the SQL : statement, calling dbcmd(), dbexec(), and dbresults(). I cannot use an : embedded SQL system because I do not know the SQL statements to be used at : compile time. : : My question is: What commercial database systems provide this functionality on : Unix platforms? I initially assumed that they all would, since it appears to : be such a simple and common approach; however, I was stunned when an Informix : rep told me that what I wanted to do was impossible with their system. : However, I also got the impression that the Informix rep was an idiot, so I : don't want to take that as the last word. : : Any information will be appreciated. Thanks. <STUFF DELETED> You're right, the rep is an idiot! Of course it is slightly different under informix which has ESQL/C (Encapsulated SQL in C) statements like -- prepare, execute, execute immmediate, declare, and open etc... -- the choice of which are used according to the nature and complexity of the SQL command. -- Paul Mahoney, X-Act Solutions Limited smail: 20 Shipley Lane, Cooden, Bexhill-on-Sea, East Sussex, TN39 3SR email: ptm@xact.demon.co.uk ... pmahoney@cix.compulink.co.uk phone: +44 424 3 6368