Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Update - using executenonquery

I have an update storeprocedure that return Yes if  all conditions are good, if not returns No. Now in code behind, do I use executenonquery ? I want to display to a user if update is success or not.
0
VBdotnet2005
Asked:
VBdotnet2005
1 Solution
 
ravikantninaveCommented:
Yes you can use executenonquery. Pass some output parameter in query and return value in that paramete.  Read the value if value is Yes/No show message
0
 
Carl TawnSystems and Integration DeveloperCommented:
It depends how the proc is returning the value. If you are using an output parameter then you can use ExecuteNonQuery(). If it returns a value with a SELECT then you will need to use ExecuteScalar() instead.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now