The Artima Developer Community
Sponsored Link

C# Answers Forum
Why it does not work if disable local network???

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ho Ngoc Hung

Posts: 4
Nickname: hongochung
Registered: Mar, 2004

Why it does not work if disable local network??? Posted: Mar 8, 2004 9:54 PM
Reply to this message Reply
Advertisement
my follow codes is get all SQL serner name in local network

public static ArrayList GetSQLServer()
{
ArrayList list = new ArrayList();
try
{
SQLDMO.ApplicationClass oSQLApp = new SQLDMO.ApplicationClass();
SQLDMO.NameList oNames = oSQLApp.ListAvailableSQLServers();
for (int i = 1; i <= oNames.Count; i++)
list.Add(oNames.Item(i));
oNames = null;
oSQLApp = null;

return list;
}
catch(Exception ex)
{
throw ex;
}
}


In my computer, it use that method to retrive all SQL server name, if i let my local network available, it get well. but when i disable my local network from my computer, it return nothing although my computer had installed SQL server or SQL engine.

tell me why ? and how to fix this problem.

Thanks, please show me as soon as posible.

Topic: Need help with read and Birnay File !!! Previous Topic   Next Topic Topic: BITS (Background Intelligent Transfer Service) and SSL and .NET ????

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use