Private Function IsClientAdmitted(ClientID As Integer) As BooleanDim conn As SqlConnectionDim cmd As New SqlCommandDim passOrFail As StringpassOrFail = Falseconn = New SqlConnection(ConfigurationManager.ConnectionStrings("conn_string").ConnectionString())
Trycmd.CommandText = "csp_validate_progress_notes_entry"cmd.CommandType = CommandType.StoredProcedurecmd.Connection = conn
cmd.Parameters.Add(
"@ClientID", SqlDbType.Int).Value = ClientIDcmd.Connection.Open()
passOrFail = cmd.ExecuteScalar()
Return passOrFail
Catch ex As ExceptionRaiseEvent StatusMessageChanged(New StatusMessageEventArgs("Error Connecting to Database", StatusMessageEventArgs.StatusMessageType.ErrorMsg))
Return passOrFail
FinallyIf Not conn Is Nothing Thenconn.Close()End IfEnd TryEnd Function
Software engineering and business solutions blog featuring SaaS reviews, automation tools, and business insurance guides. Buyer-intent content designed to drive high-quality traffic and conversions.
Subscribe to:
Post Comments (Atom)
Top Mistakes Junior Developers Make and How to Avoid Them
Top Mistakes Junior Developers Make and How to Avoid Them Common Technical Mistakes Inadequate Understanding of Fundamentals One of...
-
How to clear SharePoint People Picker suggestion cache If you have been SharePoint Site owner long enough, you would have definitely ...
-
The problem was that the remote connection needed to utilize Named Pipes, but in order to utilize Named Pipes both the machine hosting the i...
-
Getting the following error (Figure 1): Server Error in '/' Application. ID4014: A SecurityTokenHandler is not registered to ...
No comments:
Post a Comment