Hi All,
Im having some problems with copying data from my dataset back to my access database. All im trying to do is get the contents of TextBox1 into the finalSolution field. I can't understand it im getting no errors and no updated data, even though im using the update method?
Also how is Console.WriteLine meant to work should a dos screen pop up or ?
Heres the code
Private Sub Progress_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
Dim db As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\helpdesk.mdb;")
Dim faultsDA As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM faults", db)
faultsDA.UpdateCommand = New OleDbCommand("SELECT * FROM faults ")
Dim faultsDS As DataSet = New DataSet()
db.Open()
faultsDA.Fill(faultsDS, "faults")
Dim faultsRow As System.Data.DataRow
For Each faultsRow In faultsDS.Tables("faults").Rows
Console.WriteLine("Company Name: " & faultsRow("userName"))
faultsRow("finalSolution") = TextBox1.Text
faultsRow.AcceptChanges()
Next faultsRow
faultsDA.Update(faultsDS, "faults")
MsgBox("finito !")
Thanks In Advance!!
Enter your message below
Sign in or Join us (it's free).