Results 1 to 2 of 2

Thread: Update unable to find TableMapping['t003Akaun'] or DataTable 't003Akaun'.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    24

    Update unable to find TableMapping['t003Akaun'] or DataTable 't003Akaun'.

    Update unable to find TableMapping['t003Akaun'] or DataTable 't003Akaun'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: Update unable to find TableMapping['t003Akaun'] or DataTable 't003Akaun'.

    Source Error:


    Line 128: myDataAdapter2 = New SqlDataAdapter(query, sqlConn)
    Line 129: DS = New DataSet()
    Line 130: myDataAdapter2.Update(DS, "t003Akaun")
    Line 131: ElseIf txtCredit.Text <> "0.00" Then
    Line 132: jum2 = txtCredit.Text + txtBalance.Text

    ''how to solve it ??..

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Update unable to find TableMapping['t003Akaun'] or DataTable 't003Akaun'.

    You've only just created a new DataSet so it's empty. You can't update a DataTable named "t003Akaun" in a DataSet that contains no tables.

    Are you trying to retrieve data or save it? If you're retrieving data then you should becalling Fill, not Update. If you're saving then you need to have already retrieved that data into the DataTable. I'd suggest that you read some of the ADO.NET tutorials from the links in my signature.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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