SP_Who does not return DBName Column
My Delphi application connects to a SQL Server Database through BDE.
In the process, my application queriesSP_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
?
精彩评论