Stored procedure--Return validation

Results 1 to 2 of 2

Thread: Stored procedure--Return validation

  1. #1
    Join Date
    Dec 1969

    Default Stored procedure--Return validation

    I am having users enter a numeric value and on the submit I execute a stored procedure based on the value entered in order to bring additional data. This works fine, however when the value that is entered does not return any value I receive an error---I am trying to pop a message if the entered value does not return any data then to have the user re-verify the number. <BR>Any idease? (coding this in C#)

  2. #2
    Join Date
    Dec 1969

    Default RE: Stored procedure--Return validation

    I presume that you are returning a DataReader with the additional information... yes?<BR><BR>In that case you just create a conditional block to test if there are any records returned - like so:<BR><BR>if(<BR>{<BR> // grab the values ;<BR>} else {<BR> // inject an error message into the page ;<BR>}<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts