Results 1 to 3 of 3

Thread: Database don't take update

Threaded View

  1. #1

    Thread Starter
    Addicted Member Rally2000's Avatar
    Join Date
    Dec 2003
    Location
    Central USA
    Posts
    134

    Unhappy Database don't take update

    Hi all!
    I have been pulling my hair out about this; I can’t find the error in the code.
    I had identical code that worked just fine in my other exercise and also the book tells me this should work, but yet it doesn’t. Someone please help me with this. I don’t have enough hair to keep pulling it LOL.
    Thanks!
    VB Code:
    1. Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    2.         Dim dsTemp As DataSet1
    3.         Me.BindingContext(DataSet11, "Tb1").EndCurrentEdit()
    4.         If DataSet11.HasChanges() Then
    5.             If MsgBox("Are all Entries Correct?", MsgBoxStyle.YesNo + MsgBoxStyle.Information) = MsgBoxResult.Yes Then
    6.                 dsTemp = CType(DataSet11.GetChanges, DataSet1)
    7.                 OleDbDataAdapter1.Update(dsTemp) '<-------------------Problem is here????? What am I missing?
    8.                 DataSet11.AcceptChanges()
    9.             Else
    10.                 Me.BindingContext(DataSet11, "Tb1").EndCurrentEdit()
    11.                 DataSet11.RejectChanges()
    12.  
    13.             End If
    14.         End If
    15.     End Sub

    Also, how would I go about making a calculation with the Access Database I’m using?
    I have a Text Box “txtBalance” that I would like to use to tell the user what his or her balance is, I was planning on using the Main menu to ad the ability to set a starting Balance.
    Sounds easy enough, but I have not come across some Info. On how to do that.
    I am interested in your opinion and thoughts in this.
    Please help me along.
    Thanks!

    Sorry but I have another Question!
    I thought I knew how to use the clipboard function but found out that I don’t!

    So here is my question on that, How do I need to code if there are multiple text boxes??
    Again Thanks!!
    Last edited by Rally2000; Dec 15th, 2003 at 10:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width