Well, that kinda works. It really doesn't guarantee that you are catching every connection to that database. That will provide you a list of all that are presently using the database but you may miss activity against that database.
Example, you could have a user do something like the following;
select * from yourdb.dbo.yourtable
...and you won't see that connected to your database in sysprocesses or sp_who2 but will see them instead connected to master.
So, if you are trying to collect all activity against that database then you will have to do something different. If just catching those that are directly using that database then you could periodically sample sp_who2. Again, you will still probably miss some as that is only a sample and not historical.
“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot