I've developed a c# web form vs2010 and it also consumes a web service that pulls data from SAP, It works fine to a certain extent.
What happens in my app is i enter in a value to a textbox click submit and it goes and calls the web service to bring back data for the value entered and will store this data in my db table.
If enter the value PME041011-K1, i will get 5 rows back from it. Now in my app i pull back back each row one at a time showing that row data in textboxes that are read only, i will then enter values into other textboxes to match the readonly data and if it matches in will insert the matched data to another table until there are no more rows left and then i have to re-enter a new value to go to SAP again. At anytime when im entering in data to match i can click cancel and restart my submit again, now this is my problem - say i only matched 3 rows out of the 5 when i canceled i should only have 2 more rows to scan, but becasue this is going away to SAP again it will get those 5 rows again making it now 7.
Can anyone help me to stop this from happening, i need a way that when i submit the value it goes away to SAP again and then tries populating my table again i need to stop this from happening and warn user that this is a duplicate, i think i need the database (sql server 2008) to check the matching? if rows already exist.