Not sure if this is what your looking for but the global variable @@spid returns you the current connection id from the server. Run the following query from the query analyser:
select * from master..sysprocesses where spid = @@spid
This will return lots of information from the sysprocesses table from within the master database. There are probably a few columns within this row including the status which may be of use to you from within you VB app.
What we have done at our site on auditing certain SP's is to have a SP_audit_table whithin the database. User id's, start and finish times and other useful data are written to this table whenever ths SP is started and finished.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.