I figured it out, here are the answers just in case it will help someone else out.
[QUOTE]jbolduc wrote
However, when I try to call it from my application it , always updates the table, no matter if the conditions are met or not.
After I thought about it, it was obviously a parameter problem. Rechecked and a couple of the parameters needed to perform the count function in sproc were not being provided. Fixed...
Getting the Return_Value back to the ObjectDataSource Updating Method was a little harder. Here is the code from SQLDataProvider, DataProvider, and Controller files that made it work.
SqlDataProvider-->
Public Overrides Function PSLPD_OverTime_SignUp48Count(ByVal Id As Integer, ByVal ModuleId As Integer, ByVal Shift As String, ByVal SignedUpUser As String, ByVal CreatedByUser As String, ByVal DateSignedUp As DateTime) As Integer
Dim Return_Value As Integer
Return_Value = SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("PSLPD_OverTime_SignUp48Count"), Id, ModuleId, Shift, SignedUpUser, CreatedByUser, DateSignedUp)
Return Return_Value
End Function
DataProvider-->
Public MustOverride Function PSLPD_OverTime_SignUp48Count(ByVal Id As Integer, ByVal ModuleId As Integer, ByVal Shift As String, ByVal SignedUpUser As String, ByVal CreatedByUser As String, ByVal DateSignedUp As DateTime) As Integer
Controller-->
<DataObjectMethod(DataObjectMethodType.Update, True)> _
Public Shared Function OverTime_SignUp48Count(ByVal objTest As OverTimeInfo) As Integer
Dim Return_Value As Integer
Return_Value = DataProvider.Instance.PSLPD_OverTime_SignUp48Count(objTest.ID, objTest.ModuleId, objTest.Shift, objTest.SignedUpUser, objTest.CreatedByUser, objTest.DateSignedUp)
Return Return_Value
End Function
Hope it helps.. John