These line of codes are what I have done. Please help me to check them.
I think they are correct, because they perform correctly when I connect to
another computer, but I've not found what the problems are.
Thanks
------------------------------------------------------------------------
private void findSqlServ()
{
try
{
SQLDMO.Applicat ion sqlApp = new SQLDMO.Applicat ionClass();
SQLDMO.NameList sqlNamelst = sqlApp.ListAvai lableSQLServers ();
this.cboServer. Items.Clear();
for (int i=1; i<=sqlNamelst.C ount; i++ )
{
object srv = sqlNamelst.Item (i);
if ( srv != null )
{
this.cboServer. Items.Add(srv);
}
}
if ( sqlNamelst.Coun t == 0 )
{
this.cboServer. Text = strNull;
}
else
{
this.cboServer. SelectedIndex = 0;
}
}
catch (Exception ex)
{
MessageBox.Show (ex.Message);
}
}
------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////////////////
"Fredrik Wahlgren" <fr************ ****@mailbox.sw ipnet.se> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. .. I tries to search for SQL server using SQLDMO, but it alway return null
although I have updated SQL to sp3
Please tell me more.
Show some code.
/Fredrik