| | |
SQL Strings
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2009
Posts: 8
Reputation:
Solved Threads: 0
Hi all,
I have an SQL Datasource:
However, i get the following error message:
Ambiguous column name 'movieID'.
Basically I am trying to join it up so whatever cinema the customer wishes to see pulls up a record of movies being shown at that chosen cinema from a previous gridview.
Any help would be appreciated.
I have an SQL Datasource:
asp.net Syntax (Toggle Plain Text)
<asp:SqlDataSource ID="shownMovie" runat="server" ConnectionString="<%$ ConnectionStrings:MovieTix %>" SelectCommand="SELECT movie.title, movie.category FROM [movie],[session],[theatre],[cinema] WHERE cinema.cinemaLocation=theatre.cinemaLocation AND theatre.theatreNumber=session.theatreNumber AND session.movieID=movie.movieID AND ([movieID] = @movieID)"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="movieID" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>
However, i get the following error message:
Ambiguous column name 'movieID'.
Basically I am trying to join it up so whatever cinema the customer wishes to see pulls up a record of movies being shown at that chosen cinema from a previous gridview.
Any help would be appreciated.
Last edited by peter_budo; Sep 27th, 2009 at 8:35 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
•
•
Hi all,
I have an SQL Datasource:
<aspqlDataSource ID="shownMovie" runat="server"
ConnectionString="<%$ ConnectionStrings:MovieTix %>"
SelectCommand="SELECT movie.title, movie.category FROM [movie],[session],[theatre],[cinema]
WHERE cinema.cinemaLocation=theatre.cinemaLocation AND theatre.theatreNumber=session.theatreNumber
AND session.movieID=movie.movieID AND ([movieID] = @movieID)">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="movieID"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</aspqlDataSource>
However, i get the following error message:
Ambiguous column name 'movieID'.
Basically I am trying to join it up so whatever cinema the customer wishes to see pulls up a record of movies being shown at that chosen cinema from a previous gridview.
Any help would be appreciated.
thanks
NEVER NEVER NEVER GIVE UP
Try using this:
text Syntax (Toggle Plain Text)
<asp:SqlDataSource ID="shownMovie" runat="server" ConnectionString="<%$ ConnectionStrings:MovieTix %>" SelectCommand="SELECT movie.title, movie.category FROM [movie],[session],[theatre],[cinema] WHERE cinema.cinemaLocation=theatre.cinemaLocation AND theatre.theatreNumber=session.theatreNumber AND session.movieID=movie.movieID AND (movie.[movieID] = @movieID)"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="movieID" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>
![]() |
Similar Threads
- Object-Relational Mapping (C#)
- Validating input variables? (PHP)
- MySQL server address NOT localhost (PHP)
- Edit join rows using a form!!!!!Help!!!! (PHP)
- Insert Into Syntax Problem (MS SQL)
- dynamic tables (ASP.NET)
- radio button ASP question?? (ASP)
- JSP and Oracle (JSP)
Other Threads in the ASP.NET Forum
- Previous Thread: Filtering records using a Dropdown list control from two tables
- Next Thread: Creating a search
Views: 260 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 activexcontrol advice ajax anathor asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit expose feedback flash flv folder form formatdecimal forms formview google grid gridview homeedition hosting identity iframe iis index javascript jquery list menu migration mono mssql multistepregistration nameisnotdeclared object objects order problem ratings refer rotatepage save search security serializesmo.table session silverlight smartcard sql sqlserver2005 suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt xml youareanotmemberofthedebuggerusers






qlDataSource ID="shownMovie" runat="server"
