473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with table creation & query

44
Dear Friends

This is Sweatha. Right now I am working in the ASP.NET 2005 with VB coding & the back end is SQL SERVER 2000.

My dilemma is

I have to design a form with 2 DropDownListboxes. I have to load the ‘names of the theater’ on the 1st DropDownListbox & the names of the movie on the second DropDownListbox. That’s why I have created 2 tables named ‘theater’ and ‘movie’ on sql server 2000. The ‘theater’ table consists of 2 fields
1) tid
2) tname

The movie table has 2 fields

1) mid
2) tid
3) mname

If I select a item in theater DropDownListbox, then the corresponding movies should be filled on the movie DropDownListbox. And by default, both the DropDownListboxes should show ‘CHOOSE’(‘Choose Theater’ in Theater-DropDownListbox and ‘Choose Movie’ in Movie DropDownListbox)

Now the problem is, I don’t know what is the next step to do is.

There is also some more thing to do. If I select the ‘theater’ & ‘movie’ & if I click the ‘Go’ button, then it should link to the next page which shows the corresponding “Show Time” of that particular selected movie & theater.

As I am new, I need the step, the exact query & ....

-sweatha
Mar 20 '08 #1
1 1100
amitpatel66
2,367 Expert 2GB
Dear Friends

This is Sweatha. Right now I am working in the ASP.NET 2005 with VB coding & the back end is SQL SERVER 2000.

My dilemma is

I have to design a form with 2 DropDownListboxes. I have to load the ‘names of the theater’ on the 1st DropDownListbox & the names of the movie on the second DropDownListbox. That’s why I have created 2 tables named ‘theater’ and ‘movie’ on sql server 2000. The ‘theater’ table consists of 2 fields
1) tid
2) tname

The movie table has 2 fields

1) mid
2) tid
3) mname

If I select a item in theater DropDownListbox, then the corresponding movies should be filled on the movie DropDownListbox. And by default, both the DropDownListboxes should show ‘CHOOSE’(‘Choose Theater’ in Theater-DropDownListbox and ‘Choose Movie’ in Movie DropDownListbox)

Now the problem is, I don’t know what is the next step to do is.

There is also some more thing to do. If I select the ‘theater’ & ‘movie’ & if I click the ‘Go’ button, then it should link to the next page which shows the corresponding “Show Time” of that particular selected movie & theater.

As I am new, I need the step, the exact query & ....

-sweatha
Try this query toi get the movie names for a particular theatre when a theatre is selected:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT mname FROM movie WHERE tid = (SELECT tid FROM theater WHERE tname = <p_tname>);
  3.  
  4.  
p_tname will be a variable in your ASP.NET which will hold the value of the theater when selected by the user and using that value we will fetch the movie names of that theater and pass it on to second drop down list.
Mar 20 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ricardo | last post by:
Hi all, I am trying to come up with a sql query (just one query) that returns all the columns for the last N records that were inserted into a table. I have a column in the table that has the...
15
by: Hemant Shah | last post by:
Folks, We have an SQL statement that was coded in an application many years ago (starting with DB V2 I think). When I upgraded to UDB 8.2, the optimizer does not use optimal path to access the...
4
by: Apple | last post by:
1. I want to create an autonumber, my requirement is : 2005/0001 (Year/autonumber), which year & autonumber no. both can auto run. 2. I had create a query by making relation to a table & query,...
20
by: Development - multi.art.studio | last post by:
Hello everyone, i just upgraded my old postgres-database from version 7.1 to 7.4.2. i dumped out my 7.1 database (with pg_dump from 7.1) as an sql-file with copy-commands and to one file using...
0
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue...
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
2
jimleon
by: jimleon | last post by:
The following query is supposed to bring up the electrical requirements of our customers (if any) based on their usaage last year. It works great if that company was with us last year and has a...
10
by: amitabh.mehra | last post by:
Hi I havent used MQT before. Read the online tips and tutorials but none seems to give any hint for my problem. I have a base table (base_table) as: st varchar(25) default...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.