Nov 29 2010

StackOverflow question answered by heavy-hitters

I asked a StackOverflow.com question today which was answered by two BIG NAMES in tech….Jon Skeet and Eric Lippert.  Pretty cool.

Nov 29 2010

Will Try / Finally (without the Catch) bubble the exception?

I am almost positive that the answer is YES. If I use a Try Finally block but do not use a Catch block then any exceptions WILL bubble. Correct?

Any thoughts on the practice in general?

Seth

Nov 29 2010

Will Try / Finally (without the Catch) bubble the exception?

I am almost positive that the answer is YES. If I use a Try Finally block but do not use a Catch block then any exceptions WILL bubble. Correct?

Any thoughts on the practice in general?

Seth

Nov 16 2010

Can someone tell me how to run a batch file from Notepad++

I thought I could run a batch file from Notepad++ directly using nppexec by (or the built in run command) by typing CMD $(FULL_CURRENT_PATH)

But since notepad++ HAS a CMD command (which open the cmd shell in the npp console) then it is not working. So running the above command opens cmd shell in the npp console but does not run the batch file. At that point I can run $(FULL_CURRENT_PATH) AND it will run the batch file. But then I have to type exit to get our of command shell mode.

Can someone tell me how to run the batch file I am current editing in npp directly in npp.

Nov 16 2010

Can someone tell me how to run a batch file from Notepad++

I thought I could run a batch file from Notepad++ directly using nppexec by (or the built in run command) by typing CMD $(FULL_CURRENT_PATH)

But since notepad++ HAS a CMD command (which open the cmd shell in the npp console) then it is not working. So running the above command opens cmd shell in the npp console but does not run the batch file. At that point I can run $(FULL_CURRENT_PATH) AND it will run the batch file. But then I have to type exit to get our of command shell mode.

Can someone tell me how to run the batch file I am current editing in npp directly in npp.

Nov 16 2010

Can someone tell me how to run a batch file from NOTEPAD++

I thought I could run a batch file from Notepad++ directly using nppexec by (or the built in run command) by typing CMD $(FULL_CURRENT_PATH)

But since notepad++ HAS a CMD command (which open the cmd shell in the npp console) then it is not working. So running the above command opens cmd shell in the npp console but does not run the batch file. At that point I can run $(CURRENT_FULL_PATH) AND it will run the batch file. But then I have to type exit to get our of command shell mode.

Can someone tell me how to run the batch file I am current editing in npp directly in npp.

Thanks in advance.

Seth

Nov 16 2010

Can someone tell me how to run a batch file from NOTEPAD++

Hello,

I thought I could run a batch file from Notepad++ directly using nppexec by (or the built in run command) by typing CMD $(FULL_CURRENT_PATH)

But since notepad++ HAS a CMD command (which open the cmd shell in the npp console) then it is not working. So running the above command opens cmd shell in the npp console but does not run the batch file. At that point I can run $(CURRENT_FULL_PATH) AND it will run the batch file. But then I have to type exit to get our of command shell mode.

Can someone tell me how to run the batch file I am current editing in npp directly in npp.

Thanks in advance.

Seth

Nov 15 2010

Comment by Seth Spearman on Please explain the syntax the SQLServer uses to create a check constraint

Thanks Joe...you have answered all my questions. You rock.
Nov 15 2010

Please explain the syntax the SQLServer uses to create a check constraint

When I right click on a default constraint and I ask SQL Server to create a CREATE script for it, it generates the following code:

ALTER TABLE [dbo].[tblEventTurnJudgeStartValues]  WITH NOCHECK ADD  CONSTRAINT [tblEventTurnJudgeStartValues_ExecutionToggle] CHECK  (([ExecutionToggle]=(1) OR [ExecutionToggle]=(0) OR [ExecutionToggle]=(-1)))
GO
ALTER TABLE [dbo].[tblEventTurnJudgeStartValues] CHECK CONSTRAINT [tblEventTurnJudgeStartValues_ExecutionToggle]

For the record, I understand the first ALTER statement but I do not understand what the the second alter statement does. Tried to google the "CHECK CONSTRAINT" phrase but only got hits on the add constraint syntax.

Thanks.

Seth

update
Thanks Joe for your answer. Found this link which helps.

http://blog.sqlauthority.com/2009/11/12/sql-server-disable-check-constraint-enable-check-constraint/

I did not know that you could enable and disable constraints. Cool!

Seth

Nov 15 2010

Please explain the syntax the SQLServer uses to create a check constraint

When I right click on a default constraint and I ask SQL Server to create a CREATE script for it, it generates the following code:

ALTER TABLE [dbo].[tblEventTurnJudgeStartValues]  WITH NOCHECK ADD  CONSTRAINT [tblEventTurnJudgeStartValues_ExecutionToggle] CHECK  (([ExecutionToggle]=(1) OR [ExecutionToggle]=(0) OR [ExecutionToggle]=(-1)))
GO
ALTER TABLE [dbo].[tblEventTurnJudgeStartValues] CHECK CONSTRAINT [tblEventTurnJudgeStartValues_ExecutionToggle]

For the record, I understand the first ALTER statement but I do not understand what the the second alter statement does. Tried to google the "CHECK CONSTRAINT" phrase but only got hits on the add constraint syntax.

Thanks.

Seth

update
Thanks Joe for your answer. Found this link which helps.

http://blog.sqlauthority.com/2009/11/12/sql-server-disable-check-constraint-enable-check-constraint/

I did not know that you could enable and disable constraints. Cool!

Seth