This topic is locked
[SOLVED]

 HELP REQD

1/20/2011 9:39:53 AM
ASPRunnerPro General questions
R
rishi111983 author

i have a project for ticket sale and computerised sale smmary

i have a movie table as master with 3 fields date , name and show time (id an auto number field is generated auto)

one table is called ticket with 4 fields ticket id (auto number), seat no( text field), ticket price(currrency) and show id(number)

one tableis login

the master table for ticket is movie with primary key as id and foreign key in ticket is Show id and they are Linked

similaly in sql qury i have linked these two tables

the problem is as follow

SAY FOR MOVIE X AT 3PM I BOOK A TICKET NUMBER 1 WITH SEAT NO A1 THEN FOR THE SAME SHOW THE SEAT SHOULD NOT BE AVAILABL AGAIN

BUT FOR MOVIE X AT 7 PM THE SEAT SHOULD BE AVAILABLE

I AM DAMN CONFSUED HOW TO ACHIEVE THIS

REST ALL IS WORKING FINE

PLZ HELP

J
Jane 1/20/2011

Hi,
you can use Before record added/Before record updated events on the Eventstab to check if this ticket is available.

Here is just a sample:

set dal_TableName = dal.Table("ticket")

set rstmp = dal_TableName.Query("[seat no]='" & values("seat no") & "' and [show id]=" & values("show id"),"")

if not rstmp.eof then

message = "error"

BeforeAdd = false

end if

rstmp.close

set rstmp=nothing

BeforeAdd = true
R
rishi111983 author 1/20/2011

its giving me an error as follow

Object required

all tables and values are in capitals i have changed them acc

i m using asp runner pro 5.2 build 423

Sergey Kornilov admin 1/20/2011

Answered to personal email. Account verification is required.

R
rishi111983 author 1/20/2011

error no 424