Error when displaying data in a datalist from sqldatasource in asp project

tenchi

New Member
I am building a website for a class and have come across an error that I can not find the solution to. I have a dropdownlist on the page that displays the cutomer name and sets the selected value to the customer id selected from a sqldatasource (data tables from access database - fig1) (this works fine as I have tested it before I added the second sqldatasource). I add a datalist control to the page and a second sqldatasource for the datalist to bind to. I configured the datasource using the configure data source wizard as shown in fig2. I then use the wizard to test the data returned by the query and see that it works, the wizard shows that the data that I wanted is returned. So I bind the datalist to the data source and now the itemtemplate (in the html source view) contains data bound labels that will show the values: \[code\]Products.Name:<asp:Label ID="Products_NameLabel" runat="server" Text='<%# Eval("Products.Name") %>' /><br />Technicians.Name:<asp:Label ID="Technicians_NameLabel" runat="server" Text='<%# Eval("Technicians.Name") %>' /><br />Incidents.DateOpened:<asp:Label ID="Incidents_DateOpenedLabel" runat="server" Text='<%# Eval("Incidents.DateOpened") %>' /><br />Incidents.DateClosed:<asp:Label ID="Incidents_DateClosedLabel" runat="server" Text='<%# Eval("Incidents.DateClosed") %>' /><br />Incidents.Description:<asp:Label ID="Incidents_DescriptionLabel" runat="server" Text='<%# Eval("Incidents.Description") %>' />\[/code\]The labels are now bound to the data returned from the second source....or so it would seem. When I run it and select a customer that should return the data that is being selected in the sqldatasource select statement, my program crashes and gives this error:\[quote\] DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Products'.\[/quote\]I do not understand why it is saying that the datarowview does not contain a column with that name when the sqldatasource clearly returns it when I test it in the wizard. Can anyone please help? P.S. Sorry for the links to imgur...apparently you have to have a higher rep to post pictures
 
Top