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
New Windows 7 workstations in existing SBS 2003 domain
WiFi / wireless connection dropped & laptops need to be rebooted to reconnect to 2Wire broadband modem : Event id 5005
how can i create window service in C# using InstallUtil.exe ??
How convert this c++ code to csharp
Access to read info from query and send out results in excel
Remote Desktop Services on Windows 2008 Foundation Server
How to solve incompatible types error in TableSorter.java?
PowerShell string += question
printmig.exe aborting early
Imail Mail Server blocked. Cant see why