PDA

Click to See Complete Forum and Search --> : ServerGroups.Count is 0 when SQLDMO is used in ASP.NET


Utpal
Mar 23rd, 2005, 01:38 AM
Hi everybody,

I am using the following code in ASP.NET:

Dim vApplication As SQLDMO.Application, _
vServerGroup As SQLDMO.ServerGroup, vServer As SQLDMO.RegisteredServer

For Each vServerGroup In vApplication.ServerGroups
For Each vServer In vServerGroup.RegisteredServers
Next
Next

The outer loop is not entered and when I checked ServerGroups.Count in Debug mode, it showed a value of 0. However, the same code works in VB 6.0. What is the solution to this problem?