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
 Development Tools
 ASP.NET
 NetServerEnum for sqlexpress

Author  Topic 

j-in-nz
Starting Member

17 Posts

Posted - 2007-01-04 : 15:24:15
Hi,
I use NetServerEnum to get a list of my sql servers in c# code, I notice that NetServerEnum does not return sqlExpress servers and databases. Do you know what I can use to return all sql servers except sqldmo.

thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-04 : 19:36:24
Use proper server type constant when parsing netserverenum api!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

j-in-nz
Starting Member

17 Posts

Posted - 2007-01-04 : 20:14:03
Hi,

I pass the SQLSERVER constant from the list below, when I pass SERVER I still don't get sqlExpress as one of the options.


None = 0,
ALL = 0xFFFFFFFF,
WORKSTATION = 0x00000001,
SERVER = 0x00000002,
SQLSERVER = 0x00000004,
DOMAIN_CTRL = 0x00000008,
DOMAIN_BAKCTRL = 0x00000010,
TIME_SOURCE = 0x00000020,
AFP = 0x00000040,
NOVELL = 0x00000080,
DOMAIN_MEMBER = 0x00000100,
PRINTQ_SERVER = 0x00000200,
DIALIN_SERVER = 0x00000400,
XENIX_SERVER = 0x00000800,
NT = 0x00001000,
WFW = 0x00002000,
SERVER_MFPN = 0x00004000,
SERVER_NT = 0x00008000,
POTENTIAL_BROWSER = 0x00010000,
BACKUP_BROWSER = 0x00020000,
MASTER_BROWSER = 0x00040000,
DOMAIN_MASTER = 0x00080000,
SERVER_OSF = 0x00100000,
SERVER_VMS = 0x00200000,
WINDOWS = 0x00400000,
Go to Top of Page
   

- Advertisement -