K
kirck
I have a .sln with one project and one form, i have a table of Access and a
Table of SQLServer
i need update data from access to SQLServer but
Me.SqlDataAdapter1.Update(Me.DsSQL1, "CtrlEmb") not working
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.OleDbDataAdapter1.Fill(Me.DsMdb1)
Me.SqlDataAdapter1.Fill(Me.DsSQL1, "CtrlEmb")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.OleDbConnection1.Open()
Me.OleDbDataAdapter1.Update(Me.DsMdb1)
Me.OleDbConnection1.Close()
Me.DsSQL1.Merge(Me.DsMdb1)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.DsSQL1.AcceptChanges()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Me.SqlConnection1.Open()
Me.SqlDataAdapter1.Update(Me.DsSQL1, "CtrlEmb")
Me.SqlConnection1.Close()
'Me.DsSQL1.WriteXml("c:\merge.xml")
'Me.SqlDataAdapter1.Fill(Me.DsSQL1, "CtrlEmb")
End Sub
Table of SQLServer
i need update data from access to SQLServer but
Me.SqlDataAdapter1.Update(Me.DsSQL1, "CtrlEmb") not working
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.OleDbDataAdapter1.Fill(Me.DsMdb1)
Me.SqlDataAdapter1.Fill(Me.DsSQL1, "CtrlEmb")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.OleDbConnection1.Open()
Me.OleDbDataAdapter1.Update(Me.DsMdb1)
Me.OleDbConnection1.Close()
Me.DsSQL1.Merge(Me.DsMdb1)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.DsSQL1.AcceptChanges()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Me.SqlConnection1.Open()
Me.SqlDataAdapter1.Update(Me.DsSQL1, "CtrlEmb")
Me.SqlConnection1.Close()
'Me.DsSQL1.WriteXml("c:\merge.xml")
'Me.SqlDataAdapter1.Fill(Me.DsSQL1, "CtrlEmb")
End Sub