DataSet Update command generation problem - spits out bad code RRS feed

  • Question


    I have a field called   item_no (string)  in a TableAdapter attached typed table.


    as soon as I include it in an update command for the table adapter, the dataset generator spits out bad code that shows in the error, basically this:


    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _

    Global.System.ComponentModel.Design.HelpKeywordAttribute(""), _

    Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _

    Public Overloads Overridable Function Update( _

    ByVal cit_cust As String, _

    ByVal clnt_cust As String, _

    ByVal posting_dt As Date, _

    ByVal store_no As String, _

    ByVal risk_co As String, _

    ByVal dispute_co As String, _

    ByVal inv_it_dt As Date, _

    ByVal inv_it_ams As Boolean, _

    ByVal inv_it_amt As Decimal, _

    ByVal terms_co As String, _

    ByVal fst_due_dt As Date, _

    ByVal fst_dsc_am As Decimal, _

    ByVal dbt_mem_dt As Date, _

    ByVal dbt_mem_no As String, _

    ByVal aging As String, _

    ByVal po_no As String, _

    ByVal our_terms As String, _

    ByVal our_termsd As String, _

    ByVal Original_client_no As String, _

    ByVal Original_cit_cust As String, _

    ByVal Original_item_type As String) As Integer

    Return Me.Update(Original_client_no, cit_cust, clnt_cust, Original_item_type, posting_dt, store_no, risk_co, dispute_co, inv_it_dt, inv_it_ams, inv_it_amt, terms_co, fst_due_dt, fst_dsc_am, dbt_mem_dt, dbt_mem_no, aging, po_no, our_terms, our_termsd, Original_client_no, Original_cit_cust, Original_item_type)

    End Function


    the problem is that it DIT NOT include the field i asked it to. item_no is nowhere to be found.

    Me.Update in the above generated code expects one more parameter.

    Now, I can go ahead and just declare the variable and put it in, but it's a pain with auto-generation i would  have to do this before I compile EVERY time just to get around it...


    is there some kind of field names we cant use or what??


    I added another table from scratch and it happened to that one too, so i can reproduce it.

    However It just recently did this after I Installed VS2008 on the same machine as far as i can tell, so i tried to reopen the project in VS2005 again (a pre-VS2008 upgrade copy) and it is doing the same behaviour.



    Tuesday, December 11, 2007 11:20 PM

All replies

  • I have only vs 2005 and have nearly identical problem.  Any help out there?
    Sunday, February 17, 2008 1:12 AM
  • WorkAround:


    I just deleted the function before compiling... I really didn't feel like copying and pasting queries and code all day.  It worked perfectly since I don't call  TableAdapter.Update(Field1,Field2,Field3 etc...)

    I just call a TableAdapter.Update(Table1)


    it sucks because I have to do this every single time I make a change that causes dataset code to regenerate, like changing any propeties in the dataset.

    Tuesday, May 13, 2008 11:00 PM