PeopleSoft Adoption Made Smooth & Simple!
On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool. Claim Your Free WalkMe Account Now
Public Function GetMaxID(ByVal tbl As String, ByVal keyFld As String, ByRef EH As ErrorHandling.ErrorHandler) Try DBConnection(EH) If EH.Bool Then sSQL = "SELECT MAX(ISNULL(" & keyFld & ",0)) + 1 FROM " & tbl cmd = New SqlCommand(sSQL, cnn) EH.Number = cmd.ExecuteScalar() End If Catch ex As Exception EH.ErrorMessage = "GetMaxID() - " & ex.Message & "...Contact Engineering!" & "~E" Finally cnn.Dispose() End Try Return EH End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.