sweeting89
asked on
DropDownList, select two values to insert a third value error
i am trying to select a fixture date in combination with the team playing on that date in a dropdownlist, which when selected will then insert the fixture ID associated with the details in the DDL to an sql table on button click.
however with the method i try i get the error 'The data types date and varchar are incompatible in the add operator.'
however with the method i try i get the error 'The data types date and varchar are incompatible in the add operator.'
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="SqlDataSource2" DataTextField="Fixture_ID"
DataValueField="FixtureID">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:loughtonccConnectionString %>"
SelectCommand="SELECT ([Fixture_Date] +' '+ [Team_Name]) as FixtureID, [Fixture_ID] FROM [Fixture]">
</asp:SqlDataSource>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER