Using Info Indexes command in ESQL/C
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, Can you tell me how I can display index information using ESQL/C. For example, I would like to get index information for a table called user_names The SQL statement is: INFO INDEXES FOR user_names I would like to store the above query into a variable (or several variables). I tried using a cursor with the FETCH INTO command, but that doesn't seem to work. Thanks, Richard Lis Email: richardl@planmatics.com
Richard Lis wrote: > Can you tell me how I can display index information using ESQL/C. Go look at the code in sqlinfo.ec in the SQLCMD package at the IIUG archives (http://www.iiug.org). > For example, I would like to get index information for a table called > user_names > > The SQL statement is: INFO INDEXES FOR user_names The DB-Access and ISQL statement is INFO INDEXES. However, when you read the manual, you'll find that the command is marked to indicate that it is not an ESQL/C statement. So, you have to write your own query - or copy mine. Or go digging around DejaNews. There've been several discussions about this, and I've given complex answers, and other people have given simpler answers which work most of the time but not always. I'd take the simpler answers unless you're into MODE ANSI databases. > I would like to store the above query into a variable (or several > variables). I tried using a cursor with the FETCH INTO command, but > that doesn't seem to work. > > Thanks, > > Richard Lis > Email: richardl@planmatics.com -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>