Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment

Nissan Altima Owners Manual

Posted in Uncategorized | Leave a comment

DbCommand.CommandTimeout vs Connection Timeout

 

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic27585.aspx

 

ConnectionTimeout = length of time to wait for a connection to become available
CommandTimeout = length of time to wait before a Command is done.

Set the CommandTimeout for long-running SQL.

Posted in Programming | Leave a comment

User input in a batch file

Taking User input in a windows batch file
Sample script

set /p UserInput=

What ever the user types in is read in to the variable %UserInput% for consumption

Posted in Programming | Leave a comment

T-SQL CLOSE Connection to DB

Disconnecting all users from the database with T-SQL

ALTER DATABASE <dbname> SET SINGLE_USER

or

ALTER DATABASE <dbname> SET SINGLE_USER WITH ROLLBACK_IMMEDIATE

The first version will allow current connection to finish their business
and commit their work. The latter option immediately disconnects all
open connections and rolls back any changes from unfinished
transactions.

MSDN Link:
http://msdn2.microsoft.com/en-us/library/ms174269.aspx

Posted in Programming | Leave a comment

Echo an empty line

When using echo command in a batch file, use period at the end to echo an empty line.
Eg:
echo     –Displays the current status of Echo command.
echo.    –Displays an empty line.

Prepending the command with @ symbol will suppress the command from being displayed in the console window when executing the batch file.

Eg:
echo This is my line
–Displays
echo This is my line
This is my line

@echo This is my line
–Displays
This is my line

Posted in Programming | Leave a comment

Single Instance Application C#

Having only a single instance of the program running for the user:
Link to Original C# Forum Thread

namespace YourRootNamespace
{
        namespace My
        {

                internal partial class MyApplication :
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
                {

                        [global::System.Diagnostics.DebuggerStepThrough()]
                        public MyApplication() :
base(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
                        {
                                this.IsSingleInstance = false;
                                this.EnableVisualStyles = true;
                                this.SaveMySettingsOnExit = true;
                                this.ShutdownStyle =
Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses;
                        }

                        [global::System.Diagnostics.DebuggerStepThrough()]
                        protected override void OnCreateMainForm()
                        {
                                this.MainForm = new global::YourRootNamespace.YourForm();
                        }

                        [STAThread]
                        static void Main(string[] args)
                        {
                                MyApplication MyApp = new MyApplication();
                                MyApp.Run(args);
                        }

                }
        }

} //end of root namespace
Posted in Programming | Leave a comment