Returning String From A Stored Procedure

  • Hi,

    Wanted to know if there was any other option other than the OUTPUT parameter to return string values from a stored proc. If I use RETURN then it throws an error saying that the @variable cannot be converted to a numeric value

    We were using numeric values for our primary keys and the procs generated the next value for these keys. Now for some business requirements I had to change them to varchar and hence had to make changes to the procs to use the OUTPUT param. But this calls for changes on the application side, so wanted to check if there was alternate way to do so that the changes at the application side can be minimized

    Please advice

    Thanks

    Vinu

  • You can select them and return then as a recordset.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply