ObjectDataSource 'SQLtblAB' could not find a non-generic method 'xUpdate' that has parameters:

I keep getting this and cannot seem to figue out the source of the problem. I have done other updates via this method, and they work.
<asp:ObjectDataSource ID="SQLtblAB" runat="server" InsertMethod="xInsert" SelectMethod="GettblAB"
        TypeName="tblAB" UpdateMethod="xUpdate" OldValuesParameterFormatString="{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="cmbAddressBookID" Name="tblABID" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:Parameter Name="tblABTCode" ConvertEmptyStringToNull="true" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="tblABReference" Type="String" />
            <asp:Parameter Name="tblABAddressTypeID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultGeneralID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultBillToID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultShipToID" Type="Int32" />
            <asp:Parameter Name="tblABAccountingDetailsID" Type="Int32" />
            <asp:Parameter Name="tblABNotes" Type="String" />
            <asp:Parameter Name="tblABActive" Type="Boolean" />
            <asp:Parameter Name="tblABStatusID" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
             <asp:ControlParameter ControlID="cmbAddressBookID" Name="tblABID" PropertyName="SelectedValue"
              Type="Int32" />
            <asp:Parameter Name="tblABReference" Type="String" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABAddressTypeID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultGeneralID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultBillToID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultShipToID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABAccountingDetailsID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABEntryDate" Type="DateTime" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABNotes" Type="String" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABActive" Type="Boolean" />
            <asp:Parameter Name="tblABStatusID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABSalesTaxGroupID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABPurchasingTaxGroupID" Type="Int32" ConvertEmptyStringToNull="true" />           
            <asp:Parameter name="ConcurrencyID" Direction="InputOutput" Type="Int32" ConvertEmptyStringToNull="true"/>
            <asp:Parameter name="LastUpdate"  Type="DateTime" ConvertEmptyStringToNull="true"/>
            <asp:Parameter name="UpdateInitials"  Type="String" ConvertEmptyStringToNull="true"/>               
        </UpdateParameters>
    </asp:ObjectDataSource>
 
 
Code in Class
 
 
Public Function xUpdate(ByVal tblABID As Int32, ByVal tblABReference As String, ByVal tblABAddressTypeID As Int32, _
                                      ByVal tblABDefaultGeneralID As Int32, ByVal tblABDefaultBillToID As Int32, _
                                      ByVal tblABDefaultShipToID As Int32, ByVal tblABAccountingDetailsID As Int32, _
                                      ByVal tblABEntryDate As Date, ByVal tblABNotes As String, ByVal tblABActive As Boolean, _
                                      ByVal tblABStatusID As Int32, ByVal tblABSalesTaxGroupID As Int32, ByVal tblABPurchasingTaxGroupID As Int32, _
                                      ByVal ConcurrecyID As Int32, ByVal LastUpdate As Date, ByVal UpdateInitials As String) As Int32
 
        cn.ConnectionString = cs
        cmd.Connection = cn
 
        cmd.CommandText = ("tblAB_INSERT")
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.AddWithValue("@tblABID", tblABID)
        cmd.Parameters.AddWithValue("@tblABReference", tblABReference.ToString())
        cmd.Parameters.AddWithValue("@tblABAddressTypeID", tblABAddressTypeID)
        cmd.Parameters.AddWithValue("@tblABDefaultGeneralID", tblABDefaultGeneralID)
        cmd.Parameters.AddWithValue("@tblABDefaultBillToID", tblABDefaultBillToID)
        cmd.Parameters.AddWithValue("@tblABDefaultShipToID", tblABDefaultShipToID)
        cmd.Parameters.AddWithValue("@tblABAccountingDetailsID", tblABAccountingDetailsID)
        cmd.Parameters.AddWithValue("@tblABEntryDate", tblABEntryDate.ToString())
        cmd.Parameters.AddWithValue("@tblABNotes", tblABNotes.ToString())
        cmd.Parameters.AddWithValue("@tblABActive", tblABActive)
        cmd.Parameters.AddWithValue("@tblABStatusID", tblABStatusID)
        cmd.Parameters.AddWithValue("@intConcurrecyID", ConcurrecyID)
        cn.Open()
        cmd.ExecuteNonQuery()
 
    End Function

Open in new window

mastersolutionsllcAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mastersolutionsllcAuthor Commented:
Mistakeon the code copy

Public Function xUpdate(ByVal tblABID As Int32, ByVal tblABReference As String, ByVal tblABAddressTypeID As Int32, _
                                      ByVal tblABDefaultGeneralID As Int32, ByVal tblABDefaultBillToID As Int32, _
                                      ByVal tblABDefaultShipToID As Int32, ByVal tblABAccountingDetailsID As Int32, _
                                      ByVal tblABEntryDate As Date, ByVal tblABNotes As String, ByVal tblABActive As Boolean, _
                                      ByVal tblABStatusID As Int32, ByVal tblABSalesTaxGroupID As Int32, ByVal tblABPurchasingTaxGroupID As Int32, _
                                      ByVal ConcurrecyID As Int32, ByVal LastUpdate As Date, ByVal UpdateInitials As String) As Int32

        cn.ConnectionString = cs
        cmd.Connection = cn

        cmd.CommandText = ("tblAB_INSERT")
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.AddWithValue("@tblABID", tblABID)
        cmd.Parameters.AddWithValue("@tblABReference", tblABReference.ToString())
        cmd.Parameters.AddWithValue("@tblABAddressTypeID", tblABAddressTypeID)
        cmd.Parameters.AddWithValue("@tblABDefaultGeneralID", tblABDefaultGeneralID)
        cmd.Parameters.AddWithValue("@tblABDefaultBillToID", tblABDefaultBillToID)
        cmd.Parameters.AddWithValue("@tblABDefaultShipToID", tblABDefaultShipToID)
        cmd.Parameters.AddWithValue("@tblABAccountingDetailsID", tblABAccountingDetailsID)
        cmd.Parameters.AddWithValue("@tblABEntryDate", tblABEntryDate.ToString())
        cmd.Parameters.AddWithValue("@tblABNotes", tblABNotes.ToString())
        cmd.Parameters.AddWithValue("@tblABActive", tblABActive)
        cmd.Parameters.AddWithValue("@tblABStatusID", tblABStatusID)
        cmd.Parameters.AddWithValue("@intConcurrecyID", ConcurrecyID)
        cn.Open()
        cmd.ExecuteNonQuery()

    End Function
0
mastersolutionsllcAuthor Commented:
<asp:ObjectDataSource ID="SQLtblAB" runat="server" InsertMethod="xInsert" SelectMethod="GettblAB"
        TypeName="tblAB" UpdateMethod="xUpdate" OldValuesParameterFormatString="{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="cmbAddressBookID" Name="tblABID" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:Parameter Name="tblABTCode" ConvertEmptyStringToNull="true" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="tblABReference" Type="String" />
            <asp:Parameter Name="tblABAddressTypeID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultGeneralID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultBillToID" Type="Int32" />
            <asp:Parameter Name="tblABDefaultShipToID" Type="Int32" />
            <asp:Parameter Name="tblABAccountingDetailsID" Type="Int32" />
            <asp:Parameter Name="tblABNotes" Type="String" />
            <asp:Parameter Name="tblABActive" Type="Boolean" />
            <asp:Parameter Name="tblABStatusID" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
             <asp:ControlParameter ControlID="cmbAddressBookID" Name="tblABID" PropertyName="SelectedValue"
              Type="Int32" />
            <asp:Parameter Name="tblABReference" Type="String" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABAddressTypeID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultGeneralID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultBillToID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABDefaultShipToID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABAccountingDetailsID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABEntryDate" Type="DateTime" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABNotes" Type="String" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABActive" Type="Boolean" />
            <asp:Parameter Name="tblABStatusID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABSalesTaxGroupID" Type="Int32" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABPurchasingTaxGroupID" Type="Int32" ConvertEmptyStringToNull="true" />          
            <asp:Parameter name="ConcurrencyID" Direction="InputOutput" Type="Int32" ConvertEmptyStringToNull="true"/>
            <asp:Parameter name="LastUpdate"  Type="DateTime" ConvertEmptyStringToNull="true"/>
            <asp:Parameter name="UpdateInitials"  Type="String" ConvertEmptyStringToNull="true"/>              
        </UpdateParameters>
    </asp:ObjectDataSource>
0
Bob LearnedCommented:
If you have parameters like this:

           <asp:Parameter Name="tblABReference" Type="String" ConvertEmptyStringToNull="true" />
            <asp:Parameter Name="tblABAddressTypeID" Type="Int32" ConvertEmptyStringToNull="true" />

then, you need to reverse the arguments for 'xUpdate', or the types won't match:

  Public Function xUpdate(ByVal tblABReference As String, ByVal tblABID As Int32...
0
mastersolutionsllcAuthor Commented:
Reverse what?
0
mastersolutionsllcAuthor Commented:
I figured it out myself. Spelling error in one of the variables intconcurrency (it was spelled intconcurrecy)

I don know how to close the question. Funny how I got no input until I cancelled my trial offer ,a nd within 2 minutes of cancelling got someone to answer. But I got it anyhow.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.