Last post Sep 29, 2011 02:04 PM by peterthegreat
Sep 29, 2011 02:04 PM|peterthegreat|LINK
At present i have a master/details app that displays and saves address details.I now wish to create a many to many relationship of addresses.
my detailsview sqldatasource has the following query statements.
ADDRESS SelectCommand="SELECT ContactID, ContactName, CompanyName,ContactTitle,Address,City,Region,Country FROM MarketPlace_SAddress WHERE ContactID = @ContactID "
InsertCommand="INSERT INTO MarketPlace_SAddress(ContactName, CompanyName,ContactTitle,Address,City,Region,Country) VALUES (@ContactName, @CompanyName,@ContactTitle,@Address,@City,@Region,@COUNTRY)"
@ContactID IS TAKEN FROM another form control.
i have attempted to create the following table as the mid table where ContactID is taken from a Form control selectedvalue parameter and the OfferID from the master FormView after data is saved.
So i will need to retrieve the new record OfferID COLOUMN and store together with ContactID in the following table.
TABLE - marketplace_address_history
Now when i want to show all records for a particular ContactID/OfferID how do i define the SELECTCOMMAND statement to display all data .
At the moment detailsview will only show one address when i want to display multiple records.