Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    42

    Unanswered: can we insert triggers in MS access

    hi all
    can we insert triggers in MS access like we do in other databases like SQL Server 2000?
    a number of people told me that i cannot as MS access does not support it!! so i m posting here just to make sure!!
    Is there a workaround for this.

    thanks......

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    What is it that you want to accomplish? With a little code, most things are possible.

    tc

  3. #3
    Join Date
    May 2006
    Posts
    42
    well, i m making small project on VB6 with Access as database.
    the project is on "Travel and Tourism".
    i m planning to use triggers so that once a person books a ticket the number of vacant seats in that particular tour for that day should be reduced by one automatically without any manual coding in the front end or middle tier.
    thats it

  4. #4
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    It sounds to me like a "trigger" is in fact a procedure of some sort, which Iimplies some sort of instruction (code) is required.

    If there is a predefined number of reservations available each day, then the number of available seats is always this number minus the number of seats already reserved for that day. It's not necessary to have an additional piece of data holding that tally as it can be calculated real time in the front end.

    tc

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes you can use triggers in MS Access, and VB6, but not if you are using JET as the storage mechanism. Access isn't a database itself its a front end tool sort of similar to VB6

    in any event you don't actually need to use a trigger to achieve this, with comptant db design you could count the number to bookings made using dcount or SQL Sum predicate and subtract that fromt he number of bookings available.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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