获取 Powerbuilder 数据库连接的 spid?
我一直试图找到一些关于这方面的手册信息,但我的搜索没有结果。
我正在尝试查看是否有一种方法可以找到从 Powerbuilder 到数据库的连接的唯一 spid(来自 sp_who)。
例如,用户登录,我可以看到他们的 sp_who 记录,但我希望能够在应用程序本身中获取和操作这个 id。
(这可能很简单。免费代表,pb 专家!)
I've been trying to find some manual information on this, but my search is fruitless.
I'm trying to see if there is a way to find the unique spid (from sp_who) of a connection into a database from Powerbuilder.
As in, a user logs in, and I can see their sp_who record, but I want to be able to obtain and manipulate this id in the application itself.
(This is probably an easy one. Free rep, pb experts!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,今天早上再次尝试谷歌搜索(并得到这个问题作为第一个结果:p)后,我发现实际上有一个我可以调用的
@@SPID
变量。我所做的是创建一个过程,
然后在我的应用程序中我只需执行该过程
即可为我提供 sqlca 连接的 spid。
^_^
Well, after trying to google this again this morning (and getting this question as the first result :p) I've found that there's actually a
@@SPID
variable that I can call.What I've done is create a procedure
then in my application I just go
which gives me the spid for the sqlca connection.
^_^
无需创建存储过程即可访问 SPID 的另一种方法是从派生表中访问它,如下所示。
Another way of accessing the SPID without creating a stored procedure is access it from within a derived table as shown below.