I am trying to log the contents of an object to a text file. If I do a debug.print
of the object itself in the immediate window, it prints all of the values of the object's properties:
?mDb.DatabaseOptions
{Microsoft.SqlServer.Management.Smo.DatabaseOptions}
AnsiNullDefault: False
...
UserData: Nothing
However, I can't seem to access this as a string in code due to a type mismatch. I assumed I could get this information using the .ToString
method, but all that returns is the object description with none of the properties or values:
?mDb.DatabaseOptions.ToString
"Microsoft.SqlServer.Management.Smo.DatabaseOptions"
What am I missing?