| | |
SQL Strings
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






qlDataSource ID="shownMovie" runat="server"
