[Info-ingres] RE: [Openroad-users] Obtaining SQL statement that was just perfor med



Have you tried

Ingsetenv II_EMBED_SET errorqry;savequery

On the client? It seems to work for me on or4.1/sp1 ingresnedt 2.5 with
ea2.06/0403...

Regards,

pete

-----Original Message-----
From: Paul White [mailto:pwhite@xxxxxxxxxxxxxxxxx]
Sent: 17 July 2005 10:43
To: OpenROAD Users (E-mail); Info Ingres (E-mail)
Subject: [Openroad-users] Obtaining SQL statement that was just perfor
med

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.


_______________________________________________
Openroad-users mailing list
Openroad-users@xxxxxxxxxxxxxx
http://www.peerlessit.com/mailman/listinfo/openroad-users

.



Relevant Pages

  • Re: SQL string problem
    ... clean up your parameters before sending them to SQL. ... > You must "escape" any single quotes when sending SQL statements ... > Just pass your SQL statement through this function when opening your ... >> Here is the full SQL statement that is assigned to the strSQL ...
    (microsoft.public.excel.programming)
  • Re: SQL Statement or Cursor
    ... > Your post seems to ask whether you're better off using a cursor or a sql ... > you can achieve this in a SQL Statement, but I'll offer a caution to you ... SQL Server's tsql doesn't have a rownum ... >> Initial Result Set but lacking Incrementing number. ...
    (microsoft.public.sqlserver.programming)
  • Re: Populating a list -- table structure?
    ... this clears up a lot of issues and jargon with SQL. ... I think I'll have to try to get a query that will take the BKitIDs and the KitIDs and bring that information together. ... Queries (just shows the QBE grid for convenience -- ... and It really helps to use Aliases for tablenames as it makes the SQL statement shorter. ...
    (microsoft.public.access.forms)
  • Re: Emailing a Report
    ... CTRL-G to Goto the debuG window -- look at the SQL statement ... The Sub LoopAgmtsSendEmail is highlighted by the Debugger. ...
    (microsoft.public.access.modulesdaovba)
  • Re: SQL string problem
    ... You must "escape" any single quotes when sending SQL statements directly to ... Just pass your SQL statement through this function when opening your ... > Here is the full SQL statement that is assigned to the strSQL ...
    (microsoft.public.excel.programming)