Robert Dannelly blog, Over the internet you can find me by "robert dannelly blog". The blog is an ongoing blog of my software engineering over technologies C#, VB.NET, Java, React, JavaScript, .NET Core Current, SQL Server 7 - Current Version, 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 links to help support this blog. Thank you. “As an Amazon Associate, I earn from qualifying purchases.”
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)