I have a VB.Net (1.1) that uses SQL-DMO via COM Interop to create a
linked server. The code throws an exception, as it should, when the
linked server I am trying to create already exists on the server. If I
were coding this directly in ADO.Net, then the excerption thrown would
be a SQLException which I could catch and read the errorcode, which
would tell me that the error is "linked server already exists".
However, the error thrown is a
System.Runtime. InteropServices .COMException with an errorcode of
-2147206476. Is it safe for me to assume that this error code is always
the same for a linked server already existing, or is this just a
generic COMexception error code?
Thanks,
Marcus
linked server. The code throws an exception, as it should, when the
linked server I am trying to create already exists on the server. If I
were coding this directly in ADO.Net, then the excerption thrown would
be a SQLException which I could catch and read the errorcode, which
would tell me that the error is "linked server already exists".
However, the error thrown is a
System.Runtime. InteropServices .COMException with an errorcode of
-2147206476. Is it safe for me to assume that this error code is always
the same for a linked server already existing, or is this just a
generic COMexception error code?
Thanks,
Marcus