I have an issue which I have been trying to resolve for a couple of days. I am trying to update the SQL CE Server (which is in my project) with the changes that have been made to my dataset.
Dim myConn As SqlCeConnection = New SqlCeConnection(My.Settings.db_Database_Application_ConnectionString)
Dim myDataAdaptor As New SqlCeDataAdapter
Dim mySQLCommandUpdate As SqlCeCommand = New SqlCeCommand("UPDATE tblTutors SET Password = 'pass'", myConn)
Dim mySQLCommand As SqlCeCommand = New SqlCeCommand("SELECT * FROM tblTutors", myConn)
Dim myDataset As DataSet = New DataSet
myDataAdaptor.SelectCommand = mySQLCommand
myDataAdaptor.UpdateCommand = myConn.CreateCommand
myDataAdaptor.UpdateCommand.CommandText = ("UPDATE tblTutors SET Password = 'password'")
DataGridView1.DataSource = myDataset
DataGridView1.DataMember = "tbltutors"
The changes seem fine when displaying the data in the DataGridView however the changes have not been made to the SQL CE Server itself.
Can anyone spot where I am going wrong here?
Any help is much appreciated.