Election Day : Bungie vs Microsoft !

Confetti.  I felt so much glee as I hurried to GameStop to get the latest edition of Halo that it felt as if I had confetti swirling in my dome.  Unfortunately, by the time I had slapped down my chunk of cash, my little snow globe burst.

Look at the photo below.  From the left, you will see the previous two releases of Halo created by Bungie.  On the far right, you will see today’s equivalently-priced release created by 343 Studios(aka Microsoft.)  Note that these are the special editions — as opposed to the standard product.  If you aren’t familiar with the saga, here is a summary of the  corporate helldom that resulted in the tiny packet.

So disappointing … I would defect to Oracle/Java/Sun Microsystems/MySQL/ … or whoever they are this week but that probably would just be more of the same.  Oh well,  hopefully the actual game will still rock!  😀

SQL Server : Use XQuery On XML Data Types

XQuery is to XML what SQL is to database tables.   XQuery is designed to query XML data – not just XML files, but anything that can appear as XML, including databases.  In SQL Server, there are five methods that you can use to speed up your xquery to a column of type “xml:”  query(), value(), exist(), modify(), and nodes().  I’ll cover the first, and most commonly used, three.
For the purpose of this example, I will use the following sample xml in field “XmlField :”
<msg>
  <head>  
    <Id>X9356G356Y</Id>
  </head>
  <body>
    <ReturnedResponse>
      <Response>
        <ReturnCode>0</ReturnCode>      
        <Message>SUCCESS</Message>
      </Response>    
      <Customer>
   <CustomerId>CID459283</CustomerId>
        <State>NV</State>
 <Name>
  <FirstLast>Name1_Name2 </FirstLast>
        </Name>
      </Customer>
    </ReturnedResponse>
  </body>
</msg>
–XPATH Examples
–.value
SELECT  A.TransDate, A.MainId,
XmlField.value(‘/msg[1]/body[1]/ReturnedResponse[1]/Customer[1]/CustomerId[1]’, ‘VARCHAR(25)’) as xCustomerId
FROM TABLE2 B WITH (NOLOCK)
INNER JOIN TABLE1 A WITH (NOLOCK) ON B.APk = A.MainId
WHERE
A.MainId = ‘HI05491882’
–.exist
SELECT  A.TransDate, A.MainId,
XmlField.value(‘/msg[1]/body[1]/ReturnedResponse[1]/Customer[1]/CustomerId[1]’, ‘VARCHAR(25)’) as xCustomerId
FROM TABLE2 B WITH (NOLOCK)
INNER JOIN TABLE1 A WITH (NOLOCK) ON B.APk = A.MainId
WHERE
A.MainId = ‘HI05491882’
AND XmlField.exist(‘/msg/body/ReturnedResponse/Customer/CustomerId’) = 1
–.query
SELECT XmlField.query(‘/msg/body/ReturnedResponse/Customer/CustomerId’)
FROM TABLE2 B WITH (NOLOCK)
INNER JOIN TABLE1 A WITH (NOLOCK) ON B.APk = A.MainId
WHERE
A.MainId = ‘HI05491882’

Windows 7: Fatal Error: Installation ended prematurely because of an error.

Sometimes I receive the following error when trying to install an application in Vista or Windows 7. The installation seems to go through as expected but then will roll back and throw the following error (note that sometimes this error presents as “Error 2869”):

Fatal Error: Installation ended prematurely because of an error.

Apparently, this occurs when an application attempts to install with the 32-bit version of InstallUtil.exe but actually needs to use the 64-bit version of InstallUtil.exe.

Sometimes, the fix is as simple as running your installation as “Administrator.” The rest of the time, it seems as if you have to somehow point your installation to use the 64-bit version.

First, navigate to C:WindowsMicrosoft.NETFramework. From here you might see the different versions of the framework installed on your machine. There should be a version of InstallUtil.exe in each folder.

Your installation is probably trying to use 2.0.* instead of 3.0/3.5/4.0.

Work-around:

1. Locate the path to your installation program (ie, C:Program FilesMyInstallationFolderMyInstall.exe)

2. Open a command prompt window as administrator

3. Navigate to the version of InstallUtil.exe you want to use (ie, C:WindowsMicrosoft.NETFrameworkv4.0.30319)

4. Next, in the command prompt enter:
InstallUtil.exe “C:Program FilesMyInstallationFolderMyInstall.exe”

Your application should now install.

Windows 7: Customize Your Windows Theme

The default location for pre-installed Windows 7 themes are located at :


c:windowsresourcesthemes 


Locations for other wallpaper theme files :


c:windowswebwallpaper


For themes that you have downloaded yourself :


C:Users{username}AppDataLocalMicrosoftWindowsThemes


To add a wallpaper to a theme:  copy your own wallpaper image files to the folder that has the same theme name you would like to use.  Then, enable the wallpaper in “Personalize –> Desktop Background.”