Results 1 to 4 of 4
  1. #1
    towerz is offline Member
    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0

    Default jdbc trigger to check other tables

    i am developing a hostel management software using java as a frontend and a derby database as a back endn in my software i can create multiple hostel tables and the user can enter records in these tables... however i need to create a jdbc trigger in each table before insert that checks if the record being entered on a current table exists on another table, can anybody help me do this please, its urgent

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,663
    Blog Entries
    7
    Rep Power
    21

    Default Re: jdbc trigger to check other tables

    It's all in the JavaDB Reference Documentation.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    towerz is offline Member
    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0

    Default Re: jdbc trigger to check other tables

    thanks so much for your prompt reply, however i seem to be tottaly stuck when it comes to creating the sql statement in the trigger body i have been skimming through the guide practically the whole night and derby doesnt seem to support "if exists". could u pliz point me in the right direction when it comes to creating the sql statement to perform the referential check?

  4. #4
    towerz is offline Member
    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0

    Default Re: jdbc trigger to check other tables

    i have also been trying to create the trigger i keep encountering sql exceptions when trying to use if and where clauses

    (LOL!!! NICE JOKE)

Similar Threads

  1. jdbc combobox link between two tables
    By pager in forum Advanced Java
    Replies: 2
    Last Post: 04-27-2011, 06:24 PM
  2. Trigger an Event
    By koxy in forum Advanced Java
    Replies: 1
    Last Post: 03-24-2010, 08:45 AM
  3. JDBC class check
    By DavidBainbridge in forum New To Java
    Replies: 4
    Last Post: 08-17-2009, 01:52 PM
  4. Mutating trigger help
    By xcallmejudasx in forum JDBC
    Replies: 4
    Last Post: 04-24-2009, 11:49 PM
  5. programmaticly trigger an event
    By maxim in forum AWT / Swing
    Replies: 3
    Last Post: 02-23-2009, 04:27 PM

Tags for this Thread

Posting Permissions

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