G
Guest
I have this code:
foreach(SQLDMO.Database db in sqlsvr.Databases)
dblist.Add(db.Name.ToString());
But I am getting this error "Object reference not set to an instance of an
object". When I debug this piece of code, db is not an object of type
SQLDMO.Database. It is something else other than the object I want it to be.
How can this be? None of the properties and methods of an SQLDMO.Database
object are exposed in my db variable. I don't get this, I would be grateful
if someone could offer some ideas.
Thanks in advance
foreach(SQLDMO.Database db in sqlsvr.Databases)
dblist.Add(db.Name.ToString());
But I am getting this error "Object reference not set to an instance of an
object". When I debug this piece of code, db is not an object of type
SQLDMO.Database. It is something else other than the object I want it to be.
How can this be? None of the properties and methods of an SQLDMO.Database
object are exposed in my db variable. I don't get this, I would be grateful
if someone could offer some ideas.
Thanks in advance