Hi Sergey,
to follow up on this I used the API and have been able to get out all my servers. However, on one server I use a connection string specifying the server as this:
SERVER=SAMAAN3\SQLEXPRESS
But the returned list of servers just has SAMAAN3 in it.
What do I do to get the SQLEXPRESS part?
Thanks.
>You're welcome.
>
>>Thanks very much Sergey!
>>
>>>See
Re: How get list of available SQL servers? Message #
1096090 and
Re: List of Servers Message #
936587>>>
>>>>I'll see if I can get one of those to work. I like the idea of using the Windows API, but I'm not sure how I would call it after defining it like this:
>>>>
>>>>DECLARE INTEGER NetServerEnum IN netapi32;
>>>> INTEGER servername, INTEGER level,;
>>>> INTEGER @bufptr, INTEGER prefmaxlen,;
>>>> INTEGER @entriesread, INTEGER @totalentries,;
>>>> INTEGER servertype, INTEGER domain,;
>>>> INTEGER resume_handle
>>>>
>>>>