Codeine .Net RSS 2.0
# Monday, March 12, 2007

Well I passed the 70-228 exam which means I am one test away from my MCDBA.  The best part of it is that I am done with the SQL tests so now I get to focus on what I prefer more, which is development.  To study I used the Microsoft Press book: MCSA/MCSE/MCDBA Self Paced Training Kit: Microsoft SQL Server 2000 System Administration.  I selected this book simply because it appeared to be the best of the poor quality of books out there.  It was a rather boring read, and the hands on training involved running a bunch of prewritten scripts that were sometimes not explained very well.  I passed though, which is what matters.

   What I have decided though is that instead of providing me with an evaluation copy of SQL Server 2000 (or for that fact the software for what ever test you may be studying for) the publisher should provide the reader with a virtual pc image of what is required for the test.  For example all of the exercises in this book expected SQL Server 2000 running in a domain with a specific domain/computer name.  Also, several exercises required specific domain users be setup.  I would assume that most people do not have a setup like this unless they are studying on company time, and even if I did have a setup like this I wouldn't want to be messing it up adding unneccessary users for use with the exercises.  Now that Virtual PC is free it would be great for this particular test to have been provided with a virtual image of Windows Server 2003 (feel free to have it expire in 6 months like it would if I downloaded the eval copy) along with the install files for SQL Server 2000. (For this particular test installing and setup are part of the test hence not having the software already installed.  For the 70-229 test the server could already be installed as that is out of scope of the test.)  The server could then be preconfigured with the proper naming conventions and users which the setup of is completely out of the scope of the test.  This would allow the user to focus more time on the topics covered in the exam and not on the environment.  I would have to think that something like this would make all of us very happy.  Let me know what you think!

Monday, March 12, 2007 5:00:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback - Save to - Digg This! - Follow me on Twitter
Original Posts
# Sunday, March 11, 2007

Well I realize that I have fallen extremely far behind and have not finished my tutorial on putting together y DVR setup.  Hopefully I will get to it someday, but now that the steps are no longer fresh in my head it may not happen until I need to build a new box.  If you do have any questions feel free to post a comment and I’ll help you out the best I can.

What I will post about are the steps I need to take to update my box for the new DST settings.  (I hope the energy savings from the change makes up for the pain in that it has been, and the old electronic equipment I have that will now always be off.)

First off check to see what your system is currently set to:

#zdump -v /etc/localtime | grep 2007

Using this command from root will provide you with the dates your system has set for daylight savings time.  If it isn’t set to start in March then continue.

Go to the home directory for root, use ‘cd $HOME’ if you are still logged in as root and download the patch:


Now you just need to install the patch.:

#dpkg --install tzdata_2007b-1_all.deb

Finally, if you run the check again:

#zdump -v /etc/localtime | grep 2007

You should get the following output:

Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0 gmtoff=-21600

/etc/localtime  Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CDT isdst=1 gmtoff=-18000

/etc/localtime  Sun Nov  4 06:59:59 2007 UTC = Sun Nov  4 01:59:59 2007 CDT isdst=1 gmtoff=-18000

/etc/localtime  Sun Nov  4 07:00:00 2007 UTC = Sun Nov  4 01:00:00 2007 CST isdst=0 gmtoff=-21600

If only it was as easy to do with all my other equipment.  Specially thanks to everyone at the KnoppMyth Forums for posting the information on this.

Sunday, March 11, 2007 6:00:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback - Save to - Digg This! - Follow me on Twitter
Original Posts
# Sunday, January 7, 2007

    Well, the guy who has taught me everything I know about .NET, Bigyan, has taken off for a month to go back to Nepal to get married, leaving me with some very big shoes to fill while he is gone.  While he is gone I have adopted a new philosophy that I am trying to follow, WWBD, What Would Bigyan Do?
    While working on some bug fixes for a web application that we currently have in pilot testing for a client, I found myself working hard trying to prevent a post back, which I knew is exactly what Bigyan would do to increase the quality of the user experience.  I needed to create a custom validator in ASP.NET and could have easily just made it a server side validation, but this would require a post back before telling the user that there was an input error.  The way to eliminate this post back is to create a client side validation function using  JavaScript.
    This first thing that is necessary is to add a CustomValidator control to your page and to associate it to a control on the page by setting the ControlToValidate property. 
    Next, I would typically set the text of the CustomValidator control to an *.   This is the text that shows up on the page where the custom validator exists.  I normally position the CustomValidator either next to the control I am validating or next to the label for the control I am validating.  The * then indicates to the user that there is an error with that field. 
    Following setting the text I set the ErrorMessage property of the CustomValidator to the error message I want to display.  This message will then appear in the validation summary control if you have placed one on the page.
    Now its time to do a little coding.  First thing you will want to do is code up the server side validation for the validator.  This part of the validation is important in case the user's browser doesn't support JavaScript or the user attempts to bypass the script on the client side.
    In my particular case I was validating a rich textbox control that was required.  In my particular case the control would be blank either if it was actually blank or if it had "<p>&nbsp</p>", hence I could not just use the RequiredFieldValidator.  To code the server side check you use the ServerValidate event of the CustomValidator control and check the value property of the args objects that is passed in by the system.  Perform your logic and if the value passes set args.IsValid = True, otherwise set it to False. 

Protected Sub CustomValidator1_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

            If String.IsNullOrEmpty(args.Value) Or args.Value = "<p>&nbsp;</p>" Then
                args.IsValid = False
                args.IsValid = True
            End If

        End Sub


   This function will then execute when a button that has its CausesValidation property set equal to true is clicked.  Then, at any point in time if you want to check if all the validators on a page are valid you check if Page.IsValid is equal to true.

            That’s it for handling the server side validation, but the next step is to handle the client side validation so that the client is not forced to look at a post back before knowing that they have an invalid input field.

            To handle the client side validation you just need to write a simple JavaScript function that takes two parameters, sender and args.  You can then evaluate args.Value against your logic, and set args.IsValid equal to either true or false.


  function TxtQuestionValidate(sender, args)


     if (args.Value == '' || args.Value == '<p>&nbsp;</p>')


            args.IsValid = false;




            args.IsValid = true;






You have a couple options for placing the javascript function.  The simple way would be just to put it right into the .ascx page.  Whereas this is easy, I try to steer away from this as you would then need to place this function in every page where you need it.  I prefer to write a service layer function that returns it to me as a string and then insert it into the page on the page load event as follows:


Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "TxtQuestionValidate", Services.GeneralService.GetTxtBoxValidateJavascript(), True)


            Finally, you need to tell Studio to use this function as the client side script so on your custom validation control simple set the ClientValidationFunction to the name of your JavaScript function.  You now have a custom validation with a client side script to prevent a post back, which I am pretty sure is what Bigyan would do.  I hope he’s having a good time in Nepal, but I’ll be happy to have him back in 25 days.  Its boring going to Starbucks by myself!



Sunday, January 7, 2007 7:00:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback - Save to - Digg This! - Follow me on Twitter
Original Posts

<March 2007>
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2020
David A. Osborn
Sign In
Total Posts: 70
This Year: 0
This Month: 0
This Week: 0
Comments: 33
Pick a theme:
All Content © 2020, David A. Osborn
DasBlog theme 'Business' created by Christoph De Baene (delarou)