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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Try Catch?

Try Catch?

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
4 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.
  • M Offline
    M Offline
    Muntyness
    wrote on last edited by
    #1

    Is there anything like Try/Catch in ASP? I have a database query that may call on non-existant objects (It's like this for a reason, trust me :) ) and I need for it to throw up an "Invalid Argument, Choose another query" message at the bottom of the query page if an error does occur. This is a webpage based interface. - Munty

    D 1 Reply Last reply
    0
    • M Muntyness

      Is there anything like Try/Catch in ASP? I have a database query that may call on non-existant objects (It's like this for a reason, trust me :) ) and I need for it to throw up an "Invalid Argument, Choose another query" message at the bottom of the query page if an error does occur. This is a webpage based interface. - Munty

      D Offline
      D Offline
      Dayekh
      wrote on last edited by
      #2

      Absolutely.. Try [some code] Catch e As [TypeOf]Exception {e.g. SqlException} Return 0 End Try Just look up online what type of exeptions will suit your situation. :)

      M 1 Reply Last reply
      0
      • D Dayekh

        Absolutely.. Try [some code] Catch e As [TypeOf]Exception {e.g. SqlException} Return 0 End Try Just look up online what type of exeptions will suit your situation. :)

        M Offline
        M Offline
        Muntyness
        wrote on last edited by
        #3

        Thanks for that.

        D 1 Reply Last reply
        0
        • M Muntyness

          Thanks for that.

          D Offline
          D Offline
          Dayekh
          wrote on last edited by
          #4

          You're Welcome :)

          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