Well, I use the following statement to prevent create message type more than
one, but still failed.
if Object_ID('HelloWorldRequest') is null
CREATE MESSAGE TYPE [HelloWorldRequest] VALIDATION = NONE
"Frank Lee" <Reply@to.newsgroup> ¼¶¼g©ó¶l¥ó·s»D:eClvtWuCGHA.2316@TK2MSFTNGP12.phx.gbl...
> If I create message type more than once (for some reasons), I will get an
> error message of "There is already an object named 'xxxxxxxxxx' in the
[quoted text clipped - 4 lines]
> I try to use 'select Object_ID(xxxxxxxxxx)', but got 'Invalid column name
> 'xxxxxxxxxx'.
Dan - 27 Dec 2005 13:46 GMT
IF (SELECT name FROM sys.service_message_types
WHERE name = N'HelloWorldRequest' ) IS NULL
CREATE MESSAGE TYPE [HelloWorldRequest] VALIDATION = NONE
Dan
> Well, I use the following statement to prevent create message type
> more than one, but still failed.
[quoted text clipped - 12 lines]
>> I try to use 'select Object_ID(xxxxxxxxxx)', but got 'Invalid column
>> name 'xxxxxxxxxx'.