By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

how to try-catch 'sp_addrolemember'?

P: n/a
how to try-catch sp_addrolemember?

Dec 27 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
dynamic SQL helped.
Dec 27 '06 #2

P: n/a
fireball (fi******@onet.kropka.eu) writes:
how to try-catch sp_addrolemember?
Even if you found a solution I am curious: what was the problem?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 27 '06 #3

P: n/a
On Wed, 27 Dec 2006 15:36:53 +0100, fireball wrote:
>how to try-catch sp_addrolemember?
Hi fireball,

This should work

BEGIN TRY
EXEC sp_addrolemember ......
END TRY
BEGIN CATCH
PRINT 'Oops, error!'
END CATCH

--
Hugo Kornelis, SQL Server MVP
Dec 27 '06 #4

P: n/a
Uzytkownik "Erland Sommarskog" <es****@sommarskog.senapisal w wiadomosci
Even if you found a solution I am curious: what was the problem?
poor education! :p
(and - as a majority of women does - I like someone leading me with my hand
in every little step I make :-) )
Uzytkownik "Hugo Kornelis" <hu**@perFact.REMOVETHIS.info.INVALIDnapisal w
EXEC sp_addrolemember
thx.


Dec 28 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.