Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. transaction stoppage or resume

transaction stoppage or resume

Scheduled Pinned Locked Moved ASP.NET
questionhelpdatabaseperformancecareer
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    netsooz Amir Hamidi
    wrote on last edited by
    #1

    Hi folks I'm building this registration system in my asp application and I've got a question. I'd be happy if you provide me with an answer. I have a code block to check if the entered email exists or not. I've used executeScalar method here. so when the email exists I receive a ONE. now I made an if block telling the machine to print an error then and stop the process. because I'm putting the main process (saving user to DB) after this checkpoint, HOW can I stop the code blocking from process(going on to insertation) if email exists before? I mean I want the transaction to stop if email exists and this requires I think something like break; or ... . can you help me?

    Proper Prepration Prevents Poor Performance! h

    B 1 Reply Last reply
    0
    • N netsooz Amir Hamidi

      Hi folks I'm building this registration system in my asp application and I've got a question. I'd be happy if you provide me with an answer. I have a code block to check if the entered email exists or not. I've used executeScalar method here. so when the email exists I receive a ONE. now I made an if block telling the machine to print an error then and stop the process. because I'm putting the main process (saving user to DB) after this checkpoint, HOW can I stop the code blocking from process(going on to insertation) if email exists before? I mean I want the transaction to stop if email exists and this requires I think something like break; or ... . can you help me?

      Proper Prepration Prevents Poor Performance! h

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      I think this validation is better to do on DB. But, instead

      break

      use

      return


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      modified on Sunday, May 23, 2010 6:05 PM

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups