ado.net - CommandBehavior.SchemaOnly fails for some stored procedures -
making ado.net call run stored procedure using idbcommand.executereader(schemaonly)
, throws exception if stored procedure uses temp table. exception "invalid object name '#temppcbbholidays'."
(that's name of table).
so...
is using commandbehavior.schemaonly
bad idea stored procedures? if so, when need metadata should use commandbehavior.singlerow
instead?
or should put call in try/catch , on exception switch singlerow
? (this sql tool ship don't know stored procedures called.)
or there approach better?
thanks - dave
according msdn forum, known problem sql server. solution call again requesting singlerow.
Comments
Post a Comment