|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Local SQL Server Express Instance not showing up when getting datasource listI'm using System.Data.Sql.SqlDataSourceEnumerator in C# to get the available servers. It doesn't seem to find any local servers but picks up 4 others on the local network. I have both SQL Server 2005 and Express running on my system. The Express is instance named SQLExpress by default and I can administer the server through SQL Server Management Studio so I know it's running and whatnot. Any idea why I'm not seeing my local servers? code snippet of how I'm retrieving the list: System.Data.Sql.SqlDataSourceEnumerator m_SqlEnumerator = System.Data.Sql.SqlDataSourceEnumerator.Instance; System.Data.DataTable dtblDBList = new System.Data.DataTable(); dtblDBList = m_SqlEnumerator.GetDataSources(); Thanx in advance, Evan Brown This might be because (by default) SSEE is not exposed. Try enabling the
SqlBrowser service. You should not need to enable the ports and protocols as you might not want it to be visible on the LAN. -- Show quoteWilliam (Bill) Vaughn President and Founder Beta V Corporation Redmond, WA (425) 556-9205 Microsoft MVP, Author, Mentor Microsoft MVP <EvansJ***@gmail.com> wrote in message news:1142958264.654063.47950@v46g2000cwv.googlegroups.com... > Hi > > I'm using System.Data.Sql.SqlDataSourceEnumerator in C# to get the > available servers. It doesn't seem to find any local servers but picks > up 4 others on the local network. I have both SQL Server 2005 and > Express running on my system. The Express is instance named SQLExpress > by default and I can administer the server through SQL Server > Management Studio so I know it's running and whatnot. Any idea why I'm > not seeing my local servers? > > code snippet of how I'm retrieving the list: > > System.Data.Sql.SqlDataSourceEnumerator m_SqlEnumerator = > System.Data.Sql.SqlDataSourceEnumerator.Instance; > System.Data.DataTable dtblDBList = new System.Data.DataTable(); > dtblDBList = m_SqlEnumerator.GetDataSources(); > > > Thanx in advance, > Evan Brown > Thanx Bill
That seems to have done the trick. I'm still in the getting to know you stage with SQLServer 2005. Currently updating some of our software to work with it instead of MSDE and it's a bit of a learning curve to puzzel all the new stuff out. Evan |
|||||||||||||||||||||||