First of all, thanks for taking the time to read this.
This problem is occurring on my computer running Windows 2000 (SP2), SQL Server 2000 (SP1), and Visual Basic 6.0
I'm attempting to edit extended properties from a VB application by executing sp_addextendedproperty, sp_updateextendedproperty and fn_listextendedproperty through the ExecuteWithResults method of the SQLDMO.Database2 object.
Now, fn_listextendedproperty is returning question marks whenever I attempt to get the extended property values that I've added/updated through sp_addextendedproperty and sp_updateextendedproperty.
Note that this is not happening when listing extended properties created by executing the stored procedures from Query Analyzer.
I'm baffled. Does anyone have a clue as to what could be going on here???
Haven't tried this but value is an sql_variant. ????? is usually what you get if it can't convert to the datatype.
You could create a wrapper SP for fn_listextendedproperty and convert to varchar before returning.
Thanks for your suggestion Nigel, but I needed a solution that worked exclusively with SQL-DMO.
Eventually, I figured this one out.
I ran a trace and added/edited extended properties through Query Analyzer. Turns out, QA sends the parameters as unicode! This is not mentioned in BOL, and caused me a lot of heartache. After changing my execution strings to mirror those of QA, everything worked fine.