Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Using SQL, how to determine Current Session_Id?
Sat, Nov 30 2013 3:49 PMPermanent Link

Barry

Is there a way using SQL to determine the current Session_Id?

I know I can execute:
select * from configuration.serversessions;

but there is no way (I can see) to determine which of these sessions is the one I'm using (the one that issued the sql statement). I thought there would be a "Current_Session Boolean" column that would be True if this is the session I'm currently connected to.

TIA
Barry
Mon, Dec 2 2013 2:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Barry,

<< Is there a way using SQL to determine the current Session_Id?

I know I can execute:
select * from configuration.serversessions;

but there is no way (I can see) to determine which of these sessions is the
one I'm using (the one that issued the sql statement). I thought there would
be a "Current_Session Boolean" column that would be True if this is the
session I'm currently connected to. >>

You can get the session ID programmatically:

http://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=delphi&version=7&comp=TEDBSession&prop=CurrentRemoteID

and just pass it in as a parameter.

Tim Young
Elevate Software
www.elevatesoft.com
Image