This blog is about my history as a software engineer utilizing technologies C#, Java, React, JavaScript, .NET Core, SQL Server , Oracle, GIT, GitHub, Jira, Azure, AWS and HTML5. “I have not failed. I've just found 10,000 ways that won't work.” Thomas A. Edison. Please click on all my ADVERTISING links to help support this blog. Thank you.
Thursday, October 18, 2012
Move Window between monitors with keystrokes
Windows 7 function to move an application window between monitors to be very useful (by default, it is bound to the Windows Logo key + Shift + left/right arrow).
Tuesday, October 09, 2012
SQL Connection and Command Example
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
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
Subscribe to:
Posts (Atom)