Microsoft
Software
Hardware
Network
Question : How to clear a recordset
In my project I have a typed dataset and a binding source to go with my bound controlls on a form. I have enteties in a separate project and a WCF-service to handle the data.
The Dataset is calld dsCustomer.
When I load the form I do this:
CustomerBindingSource.AddN
ew()
And the OK-button have this:
CustomerBindingSource.EndE
dit()
CustomerID = proxy.SaveNewCustomer(DSCu
stomer)
The customer is saved and everything is fine. Next time I open the form the old record is still in the dataset and I can't remove it. with dsCustomer.Clear and CustomerBindingSource.Clea
r throws an exception.
I guess I'm doing something wrong here. I'd be greatful for some help. (I run .NET Framework 4.0)
Best Regards
Tomas
Answer : How to clear a recordset
In the OK_button event, add a line to re-instantiate the dataset, like this:
CustomerBindingSource
.EndEdit()
CustomerID
= proxy.SaveNewCustomer(DSCu
stomer)
DSC
ustomer = New DataSet
Random Solutions
How come when I do a copy run start, my config is always gone after a reload???
Safari 'right-click' for "add image to iPhoto" missed
How to run app on local machine and display results in web page
Virtual Memory
Excel 2003 Toolbar is different than Excel 2007 toolbar
Cannot re-enable firewall with group policy
Sharepoint Survey: Clicked 'No' to 'Show user names while creating the survey! Is there a way to turn the feature back on to see the names again?
Virtual Data Recovery Error
how many version of SQL Server on one machine
run excel and run the enable auto refresh