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)
 get mail profile name

Author  Topic 

Westley
Posting Yak Master

229 Posts

Posted - 2009-07-10 : 02:45:03
Guys,
Is there any way to get the mail profile name in SQL 2000? i know that i can use xp_get_mapi_profiles, but if a given server does not have any mapi profiles, it will return an error. Is there any other methods?
i have try to read the registry as well using xp_regread, again if profile does not exists, it will have errors, tried to use xp_regenumvalues, but for some reason, the defaultdata recordset got 1 more column (2 value column), so i cannot insert all the recordset back to a temp table. i can get the profile name if it does exists, but getting error when it doesn't. Just want to know if any way that in pure TSQL can get profile name and if it does not exists, it will just have no error message at all.

FYI, i tried to insert to a temp table and it does not have errors in query analyzer, but when i run the same script in .net, it does trigger the catch code and catch as an exception.

running out of options here, any other ideas?

Thanks
   

- Advertisement -