Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Tickets locking

    I haven't tried this sort of thing before, so I'd appreciate some pointers in
    the right direction. I'm trying to create a low-key kind of event tickets
    database. It occurs to me that it is possible for someone to be contemplating
    a set of seats while another person goes in and signs up for them. What ways
    would be good to temporarily lock a seat for a minute or so to give someone
    time to request it without another person swooping in?

    mowebdev Guest

  2. Similar Questions and Discussions

    1. Here you can read books free and buy all tickets
      Here you can read books free and buy all tickets you can find all tickets here: http://allticket.yourfreewebspace.com/ you can read books free:...
    2. Need Help with Locking
      I need help with understanding about locking. I have my DSN created as Application Variable . I want to lock a transaction in one of the module to...
    3. sessions and forms authentication tickets
      When implementing ASP.NET forms authentication everything worked out just fine. I wanted to add the UserID and UserFName to my usage so I would...
    4. Creating Tear Off Tickets!!!
      Hi, Can anyone help with this text flow problem... In the past we've created multiple certificates by placing the certificate design on a...
    5. Trouble tickets
      Hi there, Anybody an idea which phpscript I could use for a helpdesk. E-Mail messages sent to support@blabla.com should automaticaly being...
  3. #2

    Default Re: Tickets locking

    Much of this depends on the particular database and how you handle
    transactions. For instance, Oracle provides for a SELECT ... FOR UPDATE and it
    looks like SQL Server 2K has something similar in the FOR BROWSE clause. Using
    a FOR UPDATE in a SELECT will "reserve" the selected rows as if you were doing
    an UPDATE until you COMMIT or ROLLBACK. Using the FOR UPDATE NOWAIT keyword
    will tell the database not to wait if the table has been locked by another
    process, which will return control immediately to your program (stored
    procedure) where you can handle the exception, etc. such as notifying the
    calling process that the data is already selected, etc.

    Doing this kind of thing with a web based application gets kind of tricky,
    since you have to be able to tell when a particular "session" has ended, plus
    you need to guard against somebody locking data indefinitely and going to
    lunch, etc. You will need to research state management carefully to get this
    right.

    Phil

    paross1 Guest

  4. #3

    Default Re: Tickets locking

    Store "thinking about it" data in another table, and exclude this data from the
    query that looks for seats.

    You might want to add a scheduled job that deletes records from this table
    that have been there too long.

    Dan Bracuk Guest

  5. #4

    Default Re: Tickets locking

    I've compressed suggestions into this: add an "event lock date and time" and
    "event lock user" to the event record. Check for an event lock current time LT
    event lock date time or for event lock username. If those check out, update
    the event record with a date/time two minutes into the future and current
    username. Seems to work so far.

    mowebdev Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139