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. General Programming
  3. Java
  4. Problem

Problem

Scheduled Pinned Locked Moved Java
helpquestionjavadatabase
3 Posts 3 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.
  • P Offline
    P Offline
    pancakeleh
    wrote on last edited by
    #1

    Hello i have no idea if i should post it at the java forum pr the database forum, pardon me if i post it at the wrong forum. i am currently using netbeans, javadb and glassfish for my project and right now i created a table that allow user to insert values into the database. The table contains of 2 attributes a ID and Name. Problem : http://img827.imageshack.us/img827/673/helpnb.png[^][^] when the user try to add a 24 again as the ID an error page will popup. how do i create a message instead of the error popup? error popup page : http://img824.imageshack.us/img824/1426/errorye.png[^] Needing help.

    L R 2 Replies Last reply
    0
    • P pancakeleh

      Hello i have no idea if i should post it at the java forum pr the database forum, pardon me if i post it at the wrong forum. i am currently using netbeans, javadb and glassfish for my project and right now i created a table that allow user to insert values into the database. The table contains of 2 attributes a ID and Name. Problem : http://img827.imageshack.us/img827/673/helpnb.png[^][^] when the user try to add a 24 again as the ID an error page will popup. how do i create a message instead of the error popup? error popup page : http://img824.imageshack.us/img824/1426/errorye.png[^] Needing help.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      pancakeleh wrote:

      how do i create a message instead of the error popup?

      Catch the exception[^] and deal with it.

      Just say 'NO' to evaluated arguments for diadic functions! Ash

      1 Reply Last reply
      0
      • P pancakeleh

        Hello i have no idea if i should post it at the java forum pr the database forum, pardon me if i post it at the wrong forum. i am currently using netbeans, javadb and glassfish for my project and right now i created a table that allow user to insert values into the database. The table contains of 2 attributes a ID and Name. Problem : http://img827.imageshack.us/img827/673/helpnb.png[^][^] when the user try to add a 24 again as the ID an error page will popup. how do i create a message instead of the error popup? error popup page : http://img824.imageshack.us/img824/1426/errorye.png[^] Needing help.

        R Offline
        R Offline
        RaviRanjanKr
        wrote on last edited by
        #3

        You need to handle the exception and then display your customize message box as your requirement. take a look there[^] for getting more details about Exception.

        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