473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with table creation & query

44 New Member
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 DropDownListbox es. 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 DropDownListbox es should show ‘CHOOSE’(‘Choos e 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 1110
amitpatel66
2,367 Recognized Expert Top Contributor
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 DropDownListbox es. 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 DropDownListbox es should show ‘CHOOSE’(‘Choos e 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
10079
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 creation timestamp for each record. In other words, if a client requests to get only the latest 5 records, then this query shoud exactly do that: get...
15
3606
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 data. It takes about 4 minutes to get the data. In previous versions it was instantaneous. What do I need to do to increase the performance?
4
7736
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, but I can't update record in query or in form. I believe the problem is due to the source query. In source query, there is a filter to show the...
20
2477
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 insert-statements. after initalizing and starting postgres 7.4 on a different port and datadirectory, i tried to import the sql-dump with the copy...
0
2204
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 correctly, posting to the wrong forum, or committing some other sort of faux pas. My team is developing a Windows Forms application using VS 2005 with...
3
5374
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 the html page. But if I try to navigate to another pdf in the IFRAME then no caching occurs. Is the problem in the IFRAME reloading instead of just...
2
1165
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 company code in the last years electric table. However if the customer is a new one then they wont have an entry in the table; I therefore us an iif...
10
4377
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 'my_null' dt timestamp default '1900-01-01-00.00.00.00000'
2
3137
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 message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.