Silverlight / WPF - Call and run insert command Visual studio 2008

Asked By David on 08-Jul-11 05:21 AM
Hi All
 I have been trying for a year to solve the problem of running an Insert command from a Dataset to put a new row into Table 2 from table 1 The Insert run in design mode is perfect but I have no clue how to call and run in my prog
I am using a Datagridview to see all options available and want to just click on a row and then run the code.

The code I tried below is one of my many attemps.

Sub BindingNavigatorAddNewItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click

'Dim CourseS_PLAYEDTableAdapter As New CoursesPlayedDataSet

'Dim TableAdapter As New TableRow

'Dim connString As String = ConfigurationManager.ConnectionStrings("WpfDataEntry.MySettings.VB_DAVE_1__mainConnectionString").ConnectionString

'Dim SqlConnection = New SqlConnection

'Dim SqlCommand As New SqlCommand





Dim newWindow12 = New Window12


Dim newWindow3 = New Window3


End Sub

Thanks David

Web Star replied to David on 12-Jul-11 12:53 AM
WPF provides a simple and powerful way to auto-update data between the business model and the user interface.

Databinding can be unidirectional (source -> target or target <- source), or bidirectional (source <-> target).

you can insert data in wpf form using TwoWay Changes to source and destination are copied to each other .
For more details see these link