How to get Centura Sql Handles for each connected cursors on SERVER

forum.sqlbase (2000-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to get Centura Sql Handles for each connected cursors on SERVER

Post by NewsgroupServer » 18 Jan 2006, 12:53

 Posted by:  Basis 

Hi!
Can you tell me how can I get all Centura SqlHandles of cursors connected to
Server from remote connected application(Client).
I want to get Last SQL Statement on each cursor.
I've tried do this:
1) Receive cursor number by sqlgsi(get server info) API function (
field in server info struc)
2) Put this cursor number ro API function sqlget() with parameter SQLPLSS
but result is

Ok...
Than I've tried:
1) Get Cursor number like before(sqlgsi)...
2) Receive Backend cursor information by API function sqlgbi()
3) Put this BackendCur sqlget() with same parameter SQLPLSS
but... the same result

After I've found undocumented function SqlHandle SqlGetSqlHandle(Number
cursor) in CDLLI15.DLL with undepends walker for Microsoft Visual
Studio.I've never seen it in any documantation and forum. It is opposit to
known undocument Centura function .
I thought that all ok.....
But this function return me SQL Handles for cursors connected in same
application.For other cursors from server returns 0h or NULL.
May be my Centura Version is Old (CTD151).

Please help me understand SERVER WORK WITH CURSORS, relations with Cursor
Number, Cursor Handle(for Database connection), SqlHandle(for Centura) and
Backend cursor.

.
May be anybody knows how to get address of Input/Output Message Buffer or
other interesting and important information.

Thank's in advise
Alexander
Zakrevsky

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to get Centura Sql Handles for each connected cursors on SERVER

Post by NewsgroupServer » 19 Jan 2006, 16:43

 Posted by:  Mike Vandine 

This might be better asked in one of the programming forums.

Mike

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to get Centura Sql Handles for each connected cursors on SERVER

Post by NewsgroupServer » 05 Nov 2009, 16:32

 Posted by:  Rainer Ebert 

Has anyone ever get a solution for this?

I want to get the SQL statement for a cursor of another application.

I'm able to get the SQL statement for a cursor of my application. For this I
use sqlget( hCursor, SQLPLSS, sStatement, nLength ).

I'm able to geht the process and cursor information displayed by SQLConsole.
In this I see a process number and an internal cursor number. For this I use
sqlgsi( hServer, SQLGCUR | SQLXGSI, sBuffer, 64000, nLength ).

But I'm not able to get the statement for such a server cursor?

Is this possible? Has anyone got it working?

It must be possible, because in SQLConsole it is done!

Regards,
Rainer

Return to “forum.sqlbase”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests