Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Update throwing exception in WPF databinding

$
0
0

Hi!

I was part following this walkthrough http://msdn.microsoft.com/en-us/library/dd547149.aspx but with a more simplistic take. Just an editable datagrid using VS2012 and SQL Server CE. My project is called DataGrid1

I added the dataset in the usual manner, dragged and dropped a table on to the main window as a datagrid, ran it and the data showed up, I could click in to the cells etc. However when I added the save button and event

adventureWorksLTDataSetProductTableAdapter.Update(AdventureWorksLTDataSet.Product);

Now if I run it and change something and click the save changes button I get an error that says: " An unhandled exception of type 'System.NullReferenceException'. occurred in DataGrid1.exe

Additional information Object reference not to set to an instance of an object."

I checked the table adapters SQL and it looks fine, I can't figure out why this doesn't work. Any ideas?


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>