gpt4 book ai didi

sql-server - ADO.NET 中 SqlConnection (SQL-Server) 的 SPID

转载 作者:行者123 更新时间:2023-12-03 00:17:12 28 4
gpt4 key购买 nike

我可以从ADO.NET中的SqlConnection对象(SQL-Server数据库)获取SPID吗?

连接对象在其生命周期内的 SPID 是否始终相同?

最佳答案

select @@SPID 为您提供 spid。

它应该是常量,但如果您有连接池,则可能会被回收。

关于sql-server - ADO.NET 中 SqlConnection (SQL-Server) 的 SPID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3423344/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com