G
Guest
I have this code:
foreach(SQLDMO.Database db in sqlsvr.Databases)
dblist.Add(db.Name.ToString());
When I run this code I get an error "Object reference not set to an instance
of an object". When I debug this code, db is not an object of
SQLDMO.Database, and has none of the properties of an SQLDMO.Database object.
It is something else I am not sure of. Could someone tell me what is going
on. How do I get db to be an SQLDMO.Database object in my code?
foreach(SQLDMO.Database db in sqlsvr.Databases)
dblist.Add(db.Name.ToString());
When I run this code I get an error "Object reference not set to an instance
of an object". When I debug this code, db is not an object of
SQLDMO.Database, and has none of the properties of an SQLDMO.Database object.
It is something else I am not sure of. Could someone tell me what is going
on. How do I get db to be an SQLDMO.Database object in my code?