开发者

SP_Who does not return DBName Column

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜