Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 xp_findnextmsg &SQL Server 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-09-20 : 08:57:27
Tammy writes "Hi
I have a stored procedure that reads sql mail
...I only want it to read unread messages...
This worked on SQL Server 7 but now that I have moved it to 2000
it reads every message!
Any ideas?
thanks
Tammy
exec master..xp_findnextmsg @msg_id=@hMessage OUTPUT,@unread_only='true'
/*while there is a message handle*/
while @hMessage is not null"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-09-20 : 11:04:07
What parameters are you using for xp_readmail, are you sure you're marking the mail as read ? Post more of your code so we can see it in context.


HTH
Jasper Smith
Go to Top of Page
   

- Advertisement -