开发者

SP_Who does not return DBName Column

开发者 https://www.devze.com 2022-12-18 01:44 出处:网络
My Delphi application connects to a SQL Server Database through BDE. In the process, my application queries SP_Who stored procedure to get the DbName column Value. But now I want to connect my applica

My Delphi application connects to a SQL Server Database through BDE.

In the process, my application queries SP_Who stored procedure to get the DbName column Value. But now I want to connect my application through ODBC to the SQL Serve开发者_运维知识库r database.

I'm using the SQL Server Native client driver for this, but when my application queries SP_Who but the procedure does not return the DBName Column. Why is this? How can I get the value of DBName in this case? Is there any other procedure to obtain the DBName column value.


You can obtain the database name using:

SELECT DB_NAME()

Do you get the DBName column running sp_who2 ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号