SQL Server 2000, ADO 2.8, VB6
How to determi开发者_StackOverflow中文版ne if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8
You can check the @@TRANCOUNT variable, for the current connection to the database. It gets incremented by 1 every time a transaction is opened.
http://msdn.microsoft.com/en-us/library/aa933178(SQL.80).aspx
精彩评论