Here is my code:
///////////////////////////////////////////////////////////////////////////
SQLDMO._Application SqlServer = new ApplicationClass();
try
{
SQLDMO.NameList servers = SqlServer.ListAvailableSQLServers();
for(int i=0;i<servers.Count;i++)
MessageBox.Show(servers.Item(i));
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
///////////////////////////////////////////////////////////////////////////
The compiler tell me : Queryinterface is failed of the SQLDMO.NameList
What shall I do ?
Leer las respuestas