[Info-ingres] Obtaining SQL statement that was just perfor med
- From: Paul White <pwhite@xxxxxxxxxxxxxxxxx>
- Date: Sun, 17 Jul 2005 19:43:10 +1000
We're looking to report the sql statement in a generic error routine
for an OpenROAD app. It does not seem to possible unless running the
image through iidebug.img or through workbench monitor.
set_sql( savequery=1 );
... Compile error
execute immediate 'set_sql( savequery=1 )';
... Runtime error
set II_EMBED_SET=savequery
... ignored
set ING_SET="set savequery=1"
... errors when making the db connection
Jade Writes..
> Hello All,
>
> Does anyone know how to obtain the SQL statement that was just performed?
> inquire_sql doesn't help.
Roy writes..
> Execute set_sql( savequery=1 ) before running the queries you want to
> inquire about.
Victor writes..
> Try this:
> EXEC SQL BEGIN DECLARE SECTION;
> char errqry[2048];
> short null_ind;
> EXEC SQL END DECLARE SECTION;
> EXEC SQL INQUIRE_INGRES(:errqry:null_ind = QUERYTEXT);
>
> if (null_ind >= 0)
> printf(errqry);
Jim writes..
> You can do the same for an image by starting your image from the
iidebug.img
> image supplied with OpenROAD (use RunImage to run iidebug.img). Numerous
> things such as events, DB transactions can be sent to a log or displayed
on
> screen. QEPs and PrintQry information can also be obtained for SQL
statements.
.
- Prev by Date: Re: jdbc-query tracing/logging
- Next by Date: [Info-ingres] RE: [Openroad-users] Obtaining SQL statement that was just perfor med
- Previous by thread: RE: Calling Ingres Database Procedures through .Net Data Provider
- Next by thread: [Info-ingres] RE: [Openroad-users] Obtaining SQL statement that was just perfor med
- Index(es):
Relevant Pages
|