Error: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'InsertState' that h

Trying to use a tiered methodology I called the functions from my BLL.

Namespace Zzz.BusinessLogicLayer
#Region "DAL Access"
Public Class States
Public Sub New()
End Sub

Public Shared Function GetAllStates() As DataTable
Using db As New dsStatesTableAdapters.statesTableAdapter
Return db.GetData()
End Using
End Function

Public Shared Sub InsertState(ByVal UsState As String, ByVal
UsStateAbbreviation As String)
Using db As New dsStatesTableAdapters.statesTableAdapter
db.Insert(UsState, UsStateAbbreviation)
End Using
End Sub

Public Shared Sub UpdateState(ByVal UsState As String, ByVal
UsStateAbbreviation As String, ByVal original_StateId As Long)
Using db As New dsStatesTableAdapters.statesTableAdapter
db.Update(UsState, UsStateAbbreviation, original_StateId)
End Using
End Sub

Public Shared Sub DeleteState(ByVal Original_StateId As Long)
Using db As New dsStatesTableAdapters.statesTableAdapter
db.Delete(Original_StateId)
End Using
End Sub
End Class
#End Region
End Namespace

I got the default Select, Update, and Delete working, but the Insert keeps
giving me this error...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method
'InsertState' that has parameters: UsState, UsStateAbbreviation, StateId.
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.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!