<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="http://www.blue-chip.com.au/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="http://www.blue-chip.com.au/Data/xsl/rss1.xsl" ?>
<!--RSS generated by mojoPortal Blog Module V 1.0 on Sunday, May 20, 2012-->
<rss version="2.0">
  <channel>
    <title>Blog</title>
    <link>http://www.blue-chip.com.au/blog.aspx</link>
    <description />
    <copyright />
    <ttl>120</ttl>
    <managingEditor>info@nospamblue-chip.com.au</managingEditor>
    <generator>mojoPortal Blog Module V 1.0</generator>
    <item>
      <title>SSIS Script Component set column to NULL</title>
      <link>http://www.blue-chip.com.au/ssis-script-component-set-column-to-null.aspx</link>
      <pubDate>Wed, 15 Jun 2011 12:22:18 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/ssis-script-component-set-column-to-null.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/ssis-script-component-set-column-to-null.aspx</comments>
      <description><![CDATA[<p>In a previous post (<a href="http://blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx">SSIS File with Header, Detail, Trailer</a>), I wrote a Script Component to take a file containing a Header row, Detail rows, and Trailer row and insert this into a target SQL Server table. All of the data in the sample file, ‘pizza.txt’ contained values for every column. <p>But what if one of the fields had no value (eg PriceSmall is empty). We want to write NULL in the destination table column since the column accepts null. We could convert PriceSmall to zero but that will take up space in the table and could imply the price for the small pizza is $0. <p>I alter the sample file so it contains no value for PriceSmall for the Chicken Pesto pizza. Here the first detail row has nothing in it for what will become column PriceSmall, it just has 2 delimiters next to each other as in || <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Sample File" border="0" alt="Sample File" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISScriptComponentsetcolumntoNULL_1396A/image_3.png" width="247" height="64">  <p>If you run the sample code available in the previous post you will get and error and the SSIS package will fail. <p>Script component Runtime Error. Input string was not in a correct format. System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal) <p>The modification required is in the Script code ProcessInputRow procedure. Check if the column can be converted to the target data type using TryParse. If not there is a write-only <strong>&lt;column&gt;_IsNull</strong> property for each selected output column that you can use to set the column value to null.<pre class="csharpcode"><span class="rem">// If the data was not supplied its not a valid number so cannot be Converted</span>
<span class="kwrd">if</span> (<span class="kwrd">decimal</span>.TryParse(token_arr[6], <span class="kwrd">out</span> valDecimal))
{
     Row.PriceSmall = Convert.ToDecimal(token_arr[6]);
}
<span class="kwrd">else</span>
{
     Row.PriceSmall_IsNull = <span class="kwrd">true</span>;
}</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>

<p>When the data flows through the pipeline the destination table will have a NULL value if no further modifications in the dataflow for that column occur.
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Null value inserted" border="0" alt="Null value inserted" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISScriptComponentsetcolumntoNULL_1396A/image_6.png" width="447" height="85"></p><br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/ssis-script-component-set-column-to-null.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>SSIS File with Header, Detail, Trailer</title>
      <link>http://www.blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx</link>
      <pubDate>Sun, 05 Jun 2011 15:02:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx</comments>
      <description><![CDATA[<p>
	You come across all sorts of data when working with SSIS. If you can get data from a relational source or a simple data file format your work is greatly simplified. But sometimes you get file extracts from legacy or proprietary systems you don’t have much control over. One such format is the Header-Detail-Trailer type of file.</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				Here I have a Pizza store’s daily sales extract (pizza.txt), a pipe delimited file with a header, details and footer.<br />
				<br />
				Header <b>H</b> has a date representing the sales date and the name of the file.<br />
				<br />
				Details <b>D</b> have the store id, type of pizza followed by volume sales and prices for S M L size pizzas.<br />
				<br />
				Trailer <b>T </b>has a count of detail rows.</td>
			<td valign="top" width="300">
				<img alt="Sample Pizza File" border="0" height="184" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_3.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sample Pizza File" width="279" /></td>
		</tr>
	</tbody>
</table>
<p>
	So how do we get this source data loaded into a destination table on SQL Server as defined below? The LoadDate is only in the 1<sup>st</sup> header row, we don’t want to load the header or trailer rows and don’t want the D identifier for detail rows.</p>
<p>
	 </p>
<pre class="csharpcode">
<span class="kwrd">CREATE</span> <span class="kwrd">TABLE</span> LoadPizza(
LoadDate  <span class="kwrd">DATE</span>,
StoreId   <span class="kwrd">INT</span>,
PizzaName NVARCHAR(30),
SoldSmall <span class="kwrd">INT</span>,
SoldMed <span class="kwrd">INT</span>,
SoldLarge    <span class="kwrd">INT</span>,
PriceSmall   MONEY,
PriceMed     MONEY,
PriceLarge MONEY)</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>
	Open BIDS (Visual Studio 2008) and create a new Integration Services Project, lets rename the default package to Pizza.dtsx. Drop a Data Flow Task on the Control Flow. The Data Flow is where all the work is performed. The final solution will look something like this</p>
<p>
	<img alt="Final Data Flow" border="0" height="346" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_6.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Final Data Flow" width="388" /></p>
<p>
	You can see that the 18 rows from pizza.txt (1 header, 16 details, 1 footer) loads the data (ie the detail rows) into the table LoadPizza, obtaining LoadDate from the Header record, followed by only the detail record data. Why the use of 3 <b>Row Count</b> data flow items (DetailRows, HeaderRows, TrailerRows)? Without these the header and footer would also appear in the destination table as rows (nulls allowed in all columns) since they all flow through the pipeline to the OLE DB destination unless they are somehow redirected in the flow.</p>
<p>
	<img alt="Results loaded in SQL Server" border="0" height="251" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_51.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Results loaded in SQL Server" width="479" /></p>
<p>
	Start by dragging a Flat File Source onto the Data Flow design surface. The first thing to do is set up a <b>New</b> connection to point to the pizza.txt file (right click Edit) that contains the data source via the Browse button and name the Connection manager.</p>
<p>
	Select the format <b>Ragged right</b>, each row being delimited by a CR/LF and we do not want to skip any rows. We could skip the 1<sup>st</sup> row which is the header but it contains the Date representing the pizza sales we will need to insert to our target table. If we skip this row it will never be available in the pipeline. SSIS gives a warning that Columns are not defined for this connection manager. That’s fine we’ll do this later.</p>
<p>
	<img alt="Raged right file" border="0" height="352" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_52.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Raged right file" width="463" /></p>
<p>
	Click on Columns. For Ragged Right formats you can actually click on the “Ruler” at points in the file to create columns. We cant do this here as Header, Trailer and detail rows have different structures, we will use a Script component later to split the row up.</p>
<p>
	<img alt="Only one column" border="0" height="252" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_53.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Only one column" width="505" /></p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				In Advanced options, rename the column to PizzaRow and increase the size of the OutputColumnWidth to 100</td>
			<td valign="top" width="300">
				<img alt="Rename column, increase width" border="0" height="194" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_54.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Rename column, increase width" width="457" /></td>
		</tr>
		<tr>
			<td valign="top" width="300">
				If we preview the Rows, we can see each file row is represented in one column, all the way down to the trailer T|16| record.</td>
			<td valign="top" width="300">
				<img alt="Sample rows, one column only" border="0" height="271" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_55.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Sample rows, one column only" width="374" /></td>
		</tr>
	</tbody>
</table>
<p>
	We need to drag a Script Component to the design surface to break this up. When asked to Select Script Component Type, choose <b>Transformation</b> – the script is a transformation in the data flow and operates on data from input columns and provides output columns. Join the Flat File Source Path to the Script Component. You get an error icon as no code yet exists.</p>
<p>
	Add 3 Row Count items under the Script Component to the design surface and name as shown by using the Properties pane. Add an OLE DB Destination to the design surface. We could use an SQL Server Destination as well for better performance if the package runs on the same server as the destination table, otherwise OLE DB is a safer choice.</p>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				Link the Script Component SRC_Pizzas to the first Row Count item - DetailRows. When you create a Script component as a transformation, by default it has a single input and output flow.<br />
				<br />
				You will only see one output flow since currently there is only 1 output path. We’ll add more Output paths later so we can link the Header and Trailer Row Count items.</td>
			<td valign="top" width="300">
				<img alt="Script and 3 Output paths" border="0" height="357" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_56.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Script and 3 Output paths" width="373" /></td>
		</tr>
		<tr>
			<td valign="top" width="300">
				<p>
					Since Row Count items need to store count values (or you’ll get an error), define 3 count variables via menu SSIS / Variables</p>
			</td>
			<td valign="top" width="300">
				<img alt="Variables for Row Count items" border="0" height="122" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_57.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Variables for Row Count items" width="297" /></td>
		</tr>
	</tbody>
</table>
<p>
	Edit the Script Component. Configuring the input and outputs for the component is one of the steps that you must complete in metadata design mode, by using the Script Transformation Editor, before you write your custom script code.</p>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<p>
					Input Columns – check PizzaRow as the Available Input Column. Remember this is what we named the single column in the Advanced properties of SRC_Pizzas.</p>
			</td>
			<td valign="top" width="300">
				<img alt="Input Columns - Script Transformation Editor" border="0" height="193" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_58.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Input Columns - Script Transformation Editor" width="358" /></td>
		</tr>
		<tr>
			<td valign="top" width="300">
				<p>
					Input and Outputs - The initial view looks like this.</p>
				<p>
					Click and Rename Input 0 to PizzaRows via the properties window that appears.</p>
				<p>
					Click and Rename Output 0 to DetailRows.</p>
			</td>
			<td valign="top" width="300">
				<img alt="Inputs and Outputs - Script Transformation Editor" border="0" height="210" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_59.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Inputs and Outputs - Script Transformation Editor" width="340" /></td>
		</tr>
	</tbody>
</table>
<p>
	 </p>
<p>
	Expand DetailRows, highlight Output Columns and click the Add <b>Column</b> button. Do not mistakenly click Add Output, here we want to add all the columns this script component will send “Out” in its data flow when we write the script code, we are just defining the ‘column structure’ to match what our target destination expects. For each column you add, make sure the ‘folder’ Output Columns is highlighted in the tree view first, then click Add Column to ensure they are added in order.</p>
<p>
	Once all the DetailRow output columns are added, click each column and set the data type as defined in the SQL Server table, eg LoadDate is set to DT_DATE</p>
<p>
	<img alt="Define columns for Detail Row" border="0" height="241" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_60.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Define columns for Detail Row" width="467" /></p>
<p>
	 </p>
<p>
	 </p>
<p>
	In particular the PizzaName is set to Unicode string DT_WSTR and the prices to currency DT_CY. SSIS will do the type conversion for you but we’ll need to convert the Date ourselves since our header has it as 20110606 yyyyMMdd format.</p>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<p>
					So we have just laid out the structure of what will flow <b>OUT</b> of the Script Component SCR_Pizzas INTO the DetailRows output. But what about HeaderRow and TrailerRow – they don’t have the ability to join any Paths to them?</p>
			</td>
			<td valign="top" width="300">
				<img alt="More paths needed" border="0" height="123" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_61.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="More paths needed" width="381" /></td>
		</tr>
		<tr>
			<td valign="top" width="300">
				<br />
				<p>
					Lets get rid of the 3 errors first in the Row Count items – “The variable (null) specified by VariableName property is not a valid variable. Need a valid variable name to write to”</p>
				<p>
					This is done by clicking each Row Count item and selecting the appropriate User:variable name we setup earlier.</p>
			</td>
			<td valign="top" width="300">
				<img alt="Assign counter variables" border="0" height="415" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_62.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Assign counter variables" width="231" /></td>
		</tr>
	</tbody>
</table>
<p>
	If you’re still with me and haven’t yet fallen asleep or died or boredom, grab a coffee, fun stuff ahead…</p>
<p>
	Edit the Script task ‘Inputs and Outputs’ again. We now add two new <b>Outputs</b>, HeaderRow and TrailerRow. Click <b>Add Output</b>, rename it to HeaderRow and set its SynchronousInputId, via the drop down, to PizzaRows. Add another Output and rename it to TrailerRow, set the SynchronousInputId as above. We could of used only <b>one</b> combined HeaderTrailer output as well, instead of individual outputs.</p>
<p>
	 </p>
<p>
	<img alt="Add new Output flows" border="0" height="100" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_63.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Add new Output flows" width="454" /></p>
<p>
	Add a string Output column to each Output (click Output Columns then Add Column). These will become visible inside the script code and contain our header and trailer data. Set the data type of these columns to string.</p>
<p>
	<img alt="Add columns to new Output flows" border="0" height="481" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_64.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Add columns to new Output flows" width="604" /></p>
<p>
	Set all Output Rows (Detail, Header, and Trailer) to have a non-zero Exclusion Group (set them all to 1)</p>
<p>
	<img alt="Set non-zero Exclusion Group to all 3 Output flows" border="0" height="265" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_65.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Set non-zero Exclusion Group to all 3 Output flows" width="468" /></p>
<p>
	See <a href="http://msdn.microsoft.com/en-us/library/ms136114.aspx">http://msdn.microsoft.com/en-us/library/ms136114.aspx</a> for more information about Synchronous Transformation and Exclusion Groups. Basically this will provide a method in the script code to redirect rows based on conditions you can check eg Row.DirectRowToHeaderRows();&nbsp; Without specifying the Exclusion Group, these methods are not available inside the code window.</p>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<p>
					Click OK, a new arrow appears under SRC_Pizzas, connect this to HeaderRow.</p>
				<p>
					It asks you to make a connection since you defined 2 new Output flows, pick HeaderRows</p>
			</td>
			<td valign="top" width="300">
				<img alt="Link Header" border="0" height="118" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_66.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Link Header" width="350" /></td>
		</tr>
	</tbody>
</table>
<p>
	<img alt="image" border="0" height="192" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_67.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" width="606" /></p>
<p>
	 </p>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<p>
					Click SCR_Pizzas again, another arrow appears, join this to TrailerRow (no prompt appears as it’s the last available Output flow). The design surface should look like this</p>
			</td>
			<td valign="top" width="300">
				<img alt="Link Trailer" border="0" height="115" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_68.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Link Trailer" width="355" /></td>
		</tr>
	</tbody>
</table>
<p>
	Let’s take a break from Script task, we haven’t written any code yet but we’ll get there. Join the arrow from DetailRows Row Count item to OLEDB Pizza. Edit the OLE DB Destination to point to the target table in a database of your choice, see below (of course the table must exist in your DB).</p>
<p>
	<img alt="OLE DB Connection and destination table " border="0" height="390" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_69.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OLE DB Connection and destination table " width="480" /></p>
<p>
	Now when you click Mappings you will see the Output columns from the DetailRow Count appear as Available Input columns that line up to the target table columns. SSIS can derive this by matching column names. Notice PizzaRow in Available Input Columns, our large row string, goes nowhere. This is what we want as in a minute we will break up this row to setup the new columns we added manually in the Script Transformation Editor.</p>
<p>
	<img alt="Link Input Columns to Destination Columns" border="0" height="460" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_70.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Link Input Columns to Destination Columns" width="581" /></p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<p>
					Finally we write some code to remove the final warning in SRC_Pizza. So far we have defined ‘new’ output columns in SRC_Pizza and have 3 Output “paths” we will send Header, Detail and Trailer rows.</p>
			</td>
			<td valign="top" width="300">
				<img alt="Write some code" border="0" height="257" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_71.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Write some code" width="420" /></td>
		</tr>
		<tr>
			<td valign="top" width="300">
				<p>
					Right click SRC_Pizza and select Edit. Depending on your default language you could have Visual Basic 2008 or C#. Click the Edit Script button.</p>
				<p>
					This will launch the code editor.</p>
			</td>
			<td valign="top" width="300">
				<img alt="Write some code" border="0" height="164" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/SSISFilewithHeaderDetailFooter_138/image_72.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Write some code" width="451" /></td>
		</tr>
	</tbody>
</table>
<p>
	 </p>
<p>
	 </p>
<p>
	Declare some variables up top</p>
<pre class="csharpcode">
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
<span class="kwrd">public</span> <span class="kwrd">class</span> ScriptMain : UserComponent
{
    DateTime processDate;
    <span class="kwrd">string</span>[] token_arr;
    <span class="kwrd">bool</span> trailer;
    <span class="kwrd">const</span> <span class="kwrd">string</span> DELIM = <span class="str">"|"</span>;
</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>
	Most of the code goes here</p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> PizzaRows_ProcessInputRow(PizzaRowsBuffer Row)
    {
        <span class="kwrd">if</span> (processDate.Year == 1)
        {
            <span class="rem">// We have not initialise the date yet (default 01/01/0001) </span>
            ProcessHeader(Row.PizzaRow);
            Row.DirectRowToHeaderRows();
        }
        <span class="kwrd">else</span> <span class="kwrd">if</span> (!trailer)
        {
            <span class="rem">// We are now on subsequent rows</span>
            token_arr = Row.PizzaRow.Split(DELIM.ToCharArray());
            <span class="kwrd">if</span> (token_arr[0] == <span class="str">"T"</span>)
            {
                trailer = <span class="kwrd">true</span>;
                Row.DirectRowToTrailerRows();
            }
            <span class="kwrd">else</span>
            {
                <span class="rem">// Detail Row assumed (could validate later)</span>
                Row.LoadDate = processDate;
                Row.StoreId = Convert.ToInt32(token_arr[1]);
                Row.PizzaName = token_arr[2];
                Row.SoldSmall = Convert.ToInt32(token_arr[3]);
                Row.SoldMed = Convert.ToInt32(token_arr[4]);
                Row.SoldLarge = Convert.ToInt32(token_arr[5]);
                Row.PriceSmall = Convert.ToDecimal(token_arr[6]);
                Row.PriceMed = Convert.ToDecimal(token_arr[7]);
                Row.PriceLarge = Convert.ToDecimal(token_arr[8]);
                Row.DirectRowToDetailRows();
            }
        }
    }

    <span class="kwrd">private</span> <span class="kwrd">void</span> ProcessHeader(<span class="kwrd">string</span> input)
    {
        token_arr = input.Split(DELIM.ToCharArray());
        <span class="kwrd">if</span> (token_arr[0] == <span class="str">"H"</span>)
        {
            <span class="rem">// Date is 2nd array value</span>
            processDate = DateTime.ParseExact(token_arr[1], <span class="str">"yyyyMMdd"</span>, <span class="kwrd">null</span>);
        }
    }
</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>
	Since you have defined the output columns with their corresponding data types, intellisense knows about the columns and their data types in the script code.</p>
<p>
	PizzaRows_ProcessInputRow is fired for each row in the buffer, so you don’t need any looping yourself. if (processDate.Year == 1) relates to the header row since at this iteration, the processDate has not been set and defaults to the year 0001 for a DateTime variable. We grab the date off the header by splitting the row string into an array and converting the 2<sup>nd</sup> subscript (or [1]) to a date. We are done with the Header as it is redirected to the HeaderRow flow and will not flow through to the DetailRows flow, avoiding insertion into the destination table.</p>
<p>
	The next iterations could be details or trailer. If we haven’t yet found the trailer, we check for it and if found set a module level flag trailer = true and redirect the flow.</p>
<p>
	Otherwise the row must be a Detail Row, which we have again split into an array and assign the relevant subscripts to the Output columns we defined for DetailRows in the Script Transformation Editor.</p>
<p>
	Running the package gives the results shown at the beginning of this post. The package could of course be improved with the use of variables for filenames and connection managers and better error handling logic but the intention was to focus on how you might approach a solution with a data file like the sample pizza.txt header, detail, trailer rows.</p>
<p>
	<a href="http://www.blue-chip.com.au/Data/Sites/1/assets/Pizza.zip">Code sample here</a>&nbsp;(21Kb)</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Report Manager does not have Required Permissions</title>
      <link>http://www.blue-chip.com.au/report-manager-does-not-have-required-permissions.aspx</link>
      <pubDate>Thu, 12 May 2011 02:06:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/report-manager-does-not-have-required-permissions.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/report-manager-does-not-have-required-permissions.aspx</comments>
      <description><![CDATA[<p>
	Sometimes when you perform a new install of SQL Server Reporting Services locally on your machine, you get excited and enter the URL in your browser: http://localhost/Reports only to find your hopes and dreams of becoming a Reporting Services megastar shattered with an error message:</p>
<p>
	User 'domain\username' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.</p>
<p>
	&nbsp;<img alt="UAC Restrictions" border="0" height="169" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_35.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="UAC Restrictions" width="581" /></p>
<p>
	Trying out the ReportServer URL http://localhost/ReportServer gives you a similar result – The permissions granted to user ‘domain\username’ are insufficient for performing this operation. (rsAccessDenied).</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				I have read some posts that suggested tweaking IE’s Tools / Internet Options / Security Tab / Local Intranet Sites / Advanced / “Add this website to the zone” option is required.<br />
				<br />
				That placing the URL to the intranet site helps. But IE already knows the site is an Intranet one for localhost since the Option for Local Intranet is checked by default ‘Include all local (Intranet) sites not listed in other zones’<br />
				<br />
				<img alt="locahost = Local intranet" border="0" height="67" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_10.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="locahost = Local intranet" width="172" /></td>
			<td valign="top" width="300">
				<img alt="No need to add to zone unless external site" border="0" height="394" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_11.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="No need to add to zone unless external site" width="336" /></td>
		</tr>
		<tr>
			<td>
				Most post on how to fix this are correct – it has to do with SSRS Role Assignment but what may not be obvious is that Role Assignment needs to be done in <strong>2 places</strong>.<br />
				<br />
				Open IE as an Administrator and click Yes for the UAC dialog warning.</td>
			<td>
				<br />
				<img alt="image" border="0" height="145" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_34.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Run as Admin" width="219" /></td>
		</tr>
	</tbody>
</table>
<p>
	 </p>
<p>
	In my case I am running Windows 7 SP1 64 Bit. IE 8, SSRS 2008 R2 Developer Edition installed locally. If you run IE as Administrator and try http://localhost/Reports/ it works. If not you have some serious configuration issues that this post will not help with.</p>
<p>
	<img alt="SSRS Home page in IE as Adminstrator" border="0" height="119" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_38.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SSRS Home page in IE as Adminstrator" width="600" /></p>
<p>
	Click on ‘Site Settings’ from the top navigation menu, then the Security tab, then click New Role Assignment</p>
<p>
	<img alt="Add New Role Assignment at Site Level" border="0" height="170" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_18.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Add New Role Assignment at Site Level" width="483" /></p>
<p>
	Basically what you want is to add your domain or local machine name \ username as <strong>System Administrator</strong> at the <strong>Site Level</strong>. However this still wont let you into Report Manager under your normal account even if you are an administrator of your own machine. If you exit IE and go back in under your own account, you’ll still get the same error. Huh? Didn’t you just become the site’s administrator?</p>
<p>
	<img alt="SSRS make yourself a System Admin at Site Level" border="0" height="250" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_22.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SSRS make yourself a System Admin at Site Level" width="581" /></p>
<p>
	Yes but you also have to become a Content Manager for the <strong>Home</strong> folder – off which all other folders will inherit. From Home, click Folder Settings</p>
<p>
	 </p>
<p>
	 </p>
<p>
	<img alt="Home Folder security is different to Site level security" border="0" height="106" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_25.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Home Folder security is different to Site level security" width="430" /></p>
<p>
	This time the Role options are different. There is no System Administrator as was the case for Sites&nbsp; previously. You must select yourself as a <strong>Content Manager</strong>. Any folder you later create off the root Home folder will inherit these permissions. It you want users to have specific permissions to folders off the root Home folder you can do so, similar to a File Structure under Windows.</p>
<p>
	<img alt="Roles for Folders - Not Site level" border="0" height="280" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_28.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Roles for Folders - Not Site level" width="571" /></p>
<p>
	When you open IE as your regular account, it should work. Of course you could still have some other deep rooted problems with configuration files. If you run Vista, install Windows 7 with SP1 and all your problems will be solved (just kidding but why prolong the pain). If you can, and I know its not possible in cases if you have a large number of reports and SQL Agent jobs, uninstall SQL Server and start again. Often hours of backing up, installing and restoring DB’s and reports is faster than productive days lost trying to figure out why.</p>
<p>
	Remember SSRS 2008 doesn’t have a dependency on IIS like 2005 did. You wont find a web site under your IIS folder structures. If you do it’s a left over from a previous version. So don’t lose time thinking IIS security may be involved.</p>
<p>
	And use Internet Explorer for Report Manager as Firefox will report the site as running in Quirks mode, showing several CSS and JS errors that cause rendering issues and loss of functionality like drop down menu’s for Folders not working. Other browsers may report the same. It would appear cross browser compatibility was not in the design specs and this is probably ok for most environments from an SSRS administrative point of view.</p>
<p>
	<img alt="Firefox errors in Report Manager" border="0" height="188" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ReportManagerdoesnothaveRequiredPermissi_9A0A/image_33.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Firefox errors in Report Manager" width="457" /></p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/report-manager-does-not-have-required-permissions.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Upgrade Optus MyTab (ZTE V9) to Android 2.2</title>
      <link>http://www.blue-chip.com.au/upgrade-optus-mytab-zte-v9-to-android-22.aspx</link>
      <pubDate>Sat, 07 May 2011 11:20:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/upgrade-optus-mytab-zte-v9-to-android-22.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/upgrade-optus-mytab-zte-v9-to-android-22.aspx</comments>
      <description><![CDATA[<p>
	 </p>
<p>
	I was looking for a low cost tablet device that enabled me to read books, PDF documents and view technical videos downloaded from <a href="http://channel9.msdn.com/" target="_blank">Channel 9</a> whilst commuting to work. Initially I looked at the iPad2 but some of the work areas I consult in don’t have much in the way of security. So wanted something ‘no frills’ that if lost or damaged wouldn't hurt to replace. So I came across the <a href="http://www.zte.com.au/optus/V9.htm" target="_blank">ZTE V9</a> 7” Android 2.1 tablet distributed by telco Optus Australia with a pre-paid Sim card allowing 3GB downloads for 3 months.</p>
<p>
	<img alt="Optus MyTab 7&quot; Android Tablet" border="0" height="208" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_3.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Optus MyTab 7&quot; Android Tablet" width="537" /></p>
<p>
	You can’t compare it to an iPad and it doesn't pretend to be one. But the multitude of <a href="http://www.zte.com.au/optus/V9.htm" target="_blank">features</a> included for the price (&lt; $150 AUD) were hard to beat. I am always weary that dramatic price drops signal end of product life cycle or substandard build issues. Well to be honest, after I got it out of the box and set it up, I was kind of disappointed (but read on for a happier ending).</p>
<p>
	The main problem I had with it was that it was sluggish. The CPU would be 96% busy, without much running on the device. PDF documents would freeze in either Adobe Reader or the Documents To Go application bundled with the tablet, and had to be killed. I really disliked the way the home navigation menu only displayed in landscape after you closed an app that ran in portrait mode, constantly making you change orientation. So I did some research and found that Optus had just released an Android 2.2 ‘Froyo’ <a href="http://www.optus.com.au/mytabupgrade" target="_blank">Upgrade</a> for Pre-Paid 3G versions of this tablet. And OMG (yes that overused phrase) what a difference it made. The Optus overview of the upgrade lists new features (MS Exchange support) and many improvements, even stating that 2.2 can be up to 5x faster than 2.1.</p>
<p>
	The upgrade is a 150MB zip file to download. It contains a PDF file of instructions and an executable that will run on the PC. The following briefly provides an overview of the upgrade process. I make no warranties that the process works, as always you upgrade your devices at your own risk. I was using Windows 7 (64 bit) to perform the upgrade but Windows XP SP2 or later will also work.</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="347">
				Make sure the MyTab ZTE tablet is unplugged from the computer (supplied USB cable not connected) and turn it off completely.<br />
				<br />
				Launch the software executable on the PC (it wont do anything until you connect the device later).<br />
				<br />
				Power on the TZE tablet. As it says in the instructions, when you see the Android logo, press and hold the Volume Up and Down keys together until you see FTM on the screen. No idea what FTM stands for but sounds important.<br />
				<br />
				As soon as you see FTM, plug the device into the computer via the supplied USB connector.</td>
			<td valign="top" width="253">
				<img alt="Android logo" border="0" height="132" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image8.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Android logo" width="144" /><br />
				<br />
				<img alt="FTM - who knows what that means!" border="0" height="113" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image5.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FTM - who knows what that means!" width="244" /><br />
				 </td>
		</tr>
	</tbody>
</table>
<p>
	The software on the PC will then have the START button enabled and a green Ready status.</p>
<p>
	<img alt="Optus Android 2.2 Upgrade software" border="0" height="328" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_10.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Optus Android 2.2 Upgrade software" width="391" /></p>
<p>
	Click Start and the status changes to “Running” in Yellow, which also disables the Start button so you can’t click it twice. You’ll eventually see a progress bar as it download’s images onto the tablet.</p>
<p>
	<img alt="Optus Android 2.2 Upgrade progress" border="0" height="334" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_13.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Optus Android 2.2 Upgrade progress" width="400" /></p>
<p>
	The entire process took 3.33 mins as shown below.</p>
<p>
	<img alt="Optus Android 2.2 Upgrade completed" border="0" height="193" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_16.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Optus Android 2.2 Upgrade completed" width="375" /></p>
<p>
	Click ok and exit the PC application by pressing the X (Close) icon at the top right of the window, there is no other close method available. Unplug the tablet’s USB cable from the PC. The tablet will go through a longer than normal boot process the first time. According to the instructions that come with the upgrade package, when you unplug the USB cable after the software upgrade has completed you are to remove the back cover and battery before reinserting it to power the tablet back on. However I did no such thing and all was well by just waiting for the device to reboot.</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="200">
				<img alt="Portrait mode at last" border="0" height="189" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_27.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Portrait mode at last" width="145" /></td>
			<td valign="top" width="200">
				<img alt="Portrait mode at last" border="0" height="186" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_28.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Portrait mode at last" width="142" /></td>
			<td valign="top" width="200">
				<img alt="List of apps" border="0" height="190" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_29.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="List of apps" width="143" /></td>
		</tr>
	</tbody>
</table>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				At last the home page supports portrait mode.<br />
				<br />
				The Optus 3G card was working, no changes required, however I had to reconnect to a secured WiFi network.<br />
				<br />
				The software now shows Android version 2.2.</td>
			<td valign="top" width="300">
				<img alt="Android 2.2 Shown" border="0" height="184" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_30.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Android 2.2 Shown" width="204" /></td>
		</tr>
	</tbody>
</table>
<p>
	 </p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				Revisit the <a href="https://market.android.com/" target="_blank">Market place</a> and install any apps previously downloaded.<br />
				<br />
				As per Optus instructions, restore your data if you backed it up beforehand.<br />
				<br />
				The CPU now runs well below 30%, not 96% (often at &lt; 10% with many apps running). Much more responsive. Large PDF documents (500 pages / 18MB) are readable with no application freeze.<br />
				<br />
				All in all a very pleasant and fun device to work with. Sure its camera is awful, its not HD and you wouldn't perform video editing on it but that’s what I expected having read several reviews.</td>
			<td valign="top" width="300">
				<img alt="Android Market Place" border="0" height="240" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/UpgradeOptusMyTabtoAndroid2.2_14217/image_31.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Android Market Place" width="167" /></td>
		</tr>
	</tbody>
</table>
<p>
	Battery life is ok at around&nbsp;7 hours. Installing Apps from the Android Marketplace are simple and easy. I installed ‘Summer Player’ to view wmv and mp4 files, Skype, Adobe Reader, Drop Box and many fun games – all free so far. Definitely a must have upgrade. Now.. back to <a href="https://market.android.com/search?q=beat+the+chimp&amp;so=1&amp;c=apps" target="_blank">Beat The Chimp</a>.</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/upgrade-optus-mytab-zte-v9-to-android-22.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>WebMatrix for mojoPortal</title>
      <link>http://www.blue-chip.com.au/webmatrix-for-mojoportal.aspx</link>
      <pubDate>Sun, 01 May 2011 06:28:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/webmatrix-for-mojoportal.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/webmatrix-for-mojoportal.aspx</comments>
      <description><![CDATA[<p>
	I outlined in a previous post, WebMatrix for Drupal, how easy it is to use the Microsoft Web Platform Installer to setup web sites such as Drupal, using WebMatrix to edit and run sites using the IIS Express web server. The same can be said for mojoPortal. In fact once you have WebMatrix setup, you don’t even need to use the Web Platform Installer if you know you have the required prerequisites, you just download a copy of mojoPortal, open it in WebMatrix and you’ll have a new site up in minutes. I recently use this approach to do some volunteer work for a <a href="http://www.pennanthillsjafc.com.au/" target="_blank">junior Australian Rules Football club</a> web site.</p>
<p>
	Just download the latest deployment zip file for your required database and .Net Framework version from the <a href="http://www.mojoportal.com/" target="_blank">mojoPortal</a> web site. The deployment zip files contain no C# code and are all you need to create web sites using the CMS in the majority of cases.</p>
<p>
	&nbsp;<img alt="Download the latest mojoPortal zip" border="0" height="370" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_6.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Download the latest mojoPortal zip" width="509" /></p>
<p>
	Unzip the file to a directory on your hard drive. I tend to name the folders with the mojoPortal version number, eg C:\MojoPortal2362 or C:\MojoPortal2365. The file contains a wwwroot folder with all the required ASPX, JS, CSS and so on as well as some files in the root folder. Open the ReadMe.txt file.</p>
<p>
	<img alt="mojoPortal Zip file contents" border="0" height="173" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_26.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="mojoPortal Zip file contents" width="259" /></p>
<p>
	By reading the instructions, you just need to create an empty database (MS SQL Server 2008 in my case) and update the connection string in the user.config.sample file found in wwwroot, saving it as user.config. For example</p>
<p>
	&lt;add key="MSSQLConnectionString" value="server=(local);UID=fred;PWD=secret; database=mojoPortalTest" /&gt;</p>
<p>
	Then open the existing site (Site From Folder) using Microsoft WebMatrix.</p>
<p>
	<img alt="WebMatrix open site from Existing Folder" border="0" height="217" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_25.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WebMatrix open site from Existing Folder" width="394" /></p>
<p>
	Open at the wwwroot level folder, eg in this example C:\MojoPortal2365\wwwroot. If you open at the parent level C:\MojoPortal2365 you will get a strange Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.&nbsp;</p>
<p>
	Rename the site if you like, by right clicking the default wwwroot1.</p>
<p>
	<img alt="Rename the site" border="0" height="200" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_24.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Rename the site" width="352" /></p>
<p>
	Here I named the site to Demo although the title bar still shows wwwroot1 until you reopen the site. Hit the Run button on the ribbon.</p>
<p>
	<img alt="image" border="0" height="276" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_23.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" width="514" /></p>
<p>
	And a new mojoPortal site is up and running, it will have a local port number assigned by IIS Express. There are no permissions to set on specific folders, no playing around with IIS settings to get it running.</p>
<p>
	<img alt="New mojoPortal site via WebMatrix Run button" border="0" height="400" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_22.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="New mojoPortal site via WebMatrix Run button" width="464" /></p>
<p>
	You can see that it’s created all the database tables by looking at SQL Server Management Studio (in my case having selected this as my database platform) or WebMatrix. To see the tables in WebMatrix you first click on New Connection to setup the initial connection information.</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<img alt="View tables in SSMS" border="0" height="296" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_30.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="View tables in SSMS" width="229" /></td>
			<td valign="top" width="300">
				<img alt="View tables in WebMatrix" border="0" height="292" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/WebmatrixformojoPortal_C0B4/image_29.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="View tables in WebMatrix" width="308" /></td>
		</tr>
	</tbody>
</table>
<p>
	Of course you can use the Web Platform Installer to perform the complete installation of mojoPortal. But once you have WebMatrix, its simple to download and unzip the deployment files, open them in WebMatrix, create an empty database and click run. Just like 2 minute noodles, this is 2 minute mojoPortal.</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/webmatrix-for-mojoportal.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>WebMatrix for Drupal</title>
      <link>http://www.blue-chip.com.au/webmatrix-for-drupal.aspx</link>
      <pubDate>Sun, 01 May 2011 03:28:03 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/webmatrix-for-drupal.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/webmatrix-for-drupal.aspx</comments>
      <description><![CDATA[<p>I’ve blogged in the past about setting up mojoPortal with IIS, but nothing could be simpler than using <a href="http://www.microsoft.com/web/webmatrix/" target="_blank">WebMatrix</a> instead. Because it uses a lightweight web server, IIS Express, that can run ASP.Net and PHP, you can download a multitude of open-source web applications for evaluation and web development without the fuss of configuring or installing IIS (use Home Editions of Windows for web development). In this post I’ll use the Web Platform Installer to setup Acquia Drupal with MySQL and in another, mojoPortal with Web Matrix.</p> <p>The easiest way to set things up is with the Microsoft Web Platform Installer. It installs the required software and then allows you to select a web platform from a Gallery of options.</p> <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Web Platform Installer" border="0" alt="Web Platform Installer" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image_3.png" width="483" height="292"> </p> <p>Once installed you can select a ‘Site’ from a Web Gallery.</p> <p>&nbsp;<img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WebMatrix Home menu" border="0" alt="WebMatrix Home menu" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image_32.png" width="520" height="280"> </p> <p>If you select a PHP based Site, such as Acquia Drupal</p> <p></p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Web Platform Installer Web Gallery" border="0" alt="Web Platform Installer Web Gallery" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image9.png" width="518" height="351"> </p> <p>You can also select to install MySQL</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Database Options from Web Platform Installer" border="0" alt="Database Options from Web Platform Installer" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image13.png" width="445" height="190"> </p> <p>It will install and configure all the required dependencies for you (Drupal, PHP, MySQL). Best of all everything runs under IIS Express so there’s no tweaking of web servers. If you already have IIS installed on your computer you can leave it there for existing sites without having to worry about making changes to the Metabase or configuring URL rewrite, Fast CGI and so on.</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Web Platform Installer prerequisites identified" border="0" alt="Web Platform Installer prerequisites identified" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image17.png" width="553" height="390"> </p> <p>Installs in minutes</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Web Platform Installer status" border="0" alt="Web Platform Installer status" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image21.png" width="466" height="274"> </p> <p>New folders are created in the Task bar as part of the Platform Installer</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Start Menu options setup by Web Platform Installer" border="0" alt="Start Menu options setup by Web Platform Installer" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image37.png" width="191" height="152"> </p> <p>Here I am opening an Acquia Drupal Site in WebMatrix. It will list the folder structure and files for the site from where you can open all types of files extensions (CSS, ASPX, PHP, HTML, JS etc) for editing.</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WebMatrix and Drupal" border="0" alt="WebMatrix and Drupal" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image25.png" width="479" height="234"></p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Acquia Drupal running in IIS Express" border="0" alt="Acquia Drupal running in IIS Express" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image29.png" width="453" height="247"> </p> <p>Clean URL’s, Time Zone, everything is ready to start development.</p> <p>You can even use WebMatrix to browse the MySQL tables. Do you still need phpMyAdmin to administer MySQL tables? If you only ever used phpMyAdmin for Backup and Restore of databases, you can do this from the command line. If you cant live without phpMyAdmin you’ll need to install it separately but you’ll need an IIS (not Express) or Apache Web Server.</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WebMatrix Database browser" border="0" alt="WebMatrix Database browser" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image_29.png" width="471" height="334"> </p> <p>As mentioned the Web Platform Installer sets up Program Groups off the Start Menu for MySQL. One option is the MySQL Command Line Client which removes the need for phpMyAdmin. You login to the MySQL Command Line with the password you specified during setup in the Web Platform Installer. You’ll then need to know basic SQL to query tables and MySQL commands such as show databases; show tables; to browse MySQL catalogues. </p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="MySQL Command Line" border="0" alt="MySQL Command Line" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image48.png" width="456" height="322"> </p> <p>Of course most of this can be achieved with the WebMatrix Data tab in the interface. Probably the most important command is to <strong>backup</strong> your MySQL Database (hopefully this will be added to the interface soon). In its basic form you need to have the MySQL Bin folder accessible (installed by the Web Platform Installer) and enter the mysqldump command</p> <p>eg from C:\Program Files\MySQL\MySQL Server 5.1\bin, issue : mysqldump -u root -p mydatabase &gt; c:\mydatabasebackup.sql. There are many options including one to gzip the file.</p> <p>Of course, if you are really serious and want to set up a ‘Multisite’ Drupal development environment it may be best to install the <a href="http://acquia.com/" target="_blank">Acquia Drupal</a> for Windows Stack.</p> <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Acquia Drupal Stack Installer" border="0" alt="Acquia Drupal Stack Installer" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/mojoPortalwithWebMatrix_F0B3/image_22.png" width="390" height="297"> </p> <p>This will install the Apache Web Server amongst other components. The program has its own Control Panel which allows you to setup multiple Acquia Drupal sites easily, each with their own port number and MySQL database using the <strong>one installed version </strong>of Drupal. With WebMatrix you’ll have a separate copy of Drupal per site. </p> <p>Note with Acquia you still need to provide your own toolset (Dreamweaver, Expression Web, WebMatrix) to edit your site’s files (PHP, CSS, JS etc) but of course you can also use a plain text editor or Visual Studio, but like the above mentioned editors and others, WebMatrix color formats the syntax.</p> <p>Once you have the Web Platform Installer and WebMatrix installed, you can later add dozens of other open source sites (Umbraco, Kentico, Wordpress, Joomla, Moodle), as well as a selection of Web Frameworks and Database tools. Its a good way to evaluate different products, with a lightweight web server built in, to see if you want to specialize on certain platforms, perhaps using more sophisticated tools and components if you need to download them later, or just use WebMatrix and other free tools if this fulfils your development needs.</p><br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/webmatrix-for-drupal.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Easy Transfer from Vista to Windows 7</title>
      <link>http://www.blue-chip.com.au/easy-transfer-from-vista-to-windows-7.aspx</link>
      <pubDate>Mon, 28 Mar 2011 22:37:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/easy-transfer-from-vista-to-windows-7.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/easy-transfer-from-vista-to-windows-7.aspx</comments>
      <description><![CDATA[<p>
	I bid farewell to my last remaining Vista based PC the other day. A lot has been said about users experience with Windows Vista. I am happy to leave it behind and move on to Windows 7 with SP1. This post is about Windows Easy Transfer, a useful tool when you’d like a fresh install of Windows, rather than an upgrade over the top of Vista.</p>
<p>
	Unless you maintain your Windows installation with software that keeps it in tune (eg <a href="http://www.tune-up.com" target="_blank">TuneUp Utilities</a>) a few years of operation can slow down your PC and fill it with an abundance of files and registry entries. A fresh install of Windows is a good option if it’s suitable (not always possible as you’ll need to reinstall all of the software that was on the old version and update drivers as well).</p>
<p>
	<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=09d80814-2a73-4245-a63b-8e780d0430cb" target="_blank">Windows Easy Transfer</a> is described as “copy your files, photos, music, e-mail, settings, and more from a computer running Windows Vista to a computer running Windows 7. You can transfer data using an Easy Transfer Cable, removable media, or across a network”. More information is on the link provided.</p>
<p>
	From the Vista PC I fired up Easy Transfer and selected 5 user accounts. In Vista, Easy Transfer takes over your PC session so you wont be able to switch to another Window until it completes or you cancel out of it. In Windows 7 this isn't the case. You can pick and choose which items you want to transfer up to an individual account level via an intuitive tree like structure of options.</p>
<table border="0" cellpadding="2" cellspacing="0" width="600">
	<tbody>
		<tr>
			<td valign="top" width="300">
				<img alt="Windows Easy Transfer" border="0" height="165" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/EasyTransferfromVistatoWindows7_7911/image_5.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows Easy Transfer" width="244" /></td>
			<td valign="top" width="300">
				<img alt="Transfer in action" border="0" height="82" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/EasyTransferfromVistatoWindows7_7911/image_10.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Transfer in action" width="244" /></td>
		</tr>
	</tbody>
</table>
<p>
	I chose an external USB drive as the target for the transfer. A *.MIG file is created, in my case a 10GB file. Initially Easy Transfer said the file size would be a whopping 228 GB! That’s because it also selects all the local hard drives from your PC. Make sure you uncheck these if you don’t want them.</p>
<p>
	<img alt="Easy Transfer Complete" border="0" height="199" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/EasyTransferfromVistatoWindows7_7911/image_17.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Easy Transfer Complete" width="438" /></p>
<p>
	You can view a report upon completion</p>
<p>
	<img alt="Easy Transfer Report" border="0" height="234" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/EasyTransferfromVistatoWindows7_7911/image_20.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Easy Transfer Report" width="368" /></p>
<p>
	Once Windows 7 (which comes with Easy Transfer included) was newly installed with Service Pack 1, I installed all the required software, everything that would need a user account’s profile information, such as iTunes, MS Office. Once all the software was installed I fired up Windows Easy Transfer on Windows 7 and followed the wizard to import all the account settings.</p>
<p>
	This worked well with all the files correctly in place. Even Outlook (which was 2007 on Vista and 2010 on Windows 7) had the correct account settings and all emails available, the user had to only enter their password for the first time to reconnect. Easy Transfer creates the login accounts that you exported from the old PC, so you don't have to do this manually.</p>

<p>Desktop backgrounds and minor personalisation settings had to be reset but otherwise the Easy Transfer utility worked well. Windows 7 did a good job of installing Video, sound and related drivers. Only my Web Cam which is a Creative WebCam Live Ultra required me to source a hard to find ‘Beta Vista’ driver as the manufacturer no longer supports it.</p>
<p>Easy Transfer also works if moving from an old 32 Bit version of Vista/Windows 7 to a 64 Bit version of Windows 7.</p>
<p>
	Hasta la vista - Vista!</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/easy-transfer-from-vista-to-windows-7.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Extending the Date Dimension Analysis Services</title>
      <link>http://www.blue-chip.com.au/extending-the-date-dimension-analysis-services.aspx</link>
      <pubDate>Sat, 05 Feb 2011 14:13:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/extending-the-date-dimension-analysis-services.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/extending-the-date-dimension-analysis-services.aspx</comments>
      <description><![CDATA[<p>
	In SQL Server Analysis Services, you can automatically create a Date Dimension without having an underlying data store (table) of dates. The other day one of our applications could not process measures for certain transactions for year 2011. The date dimension ended at 2010.</p>
<p>
	<img alt="Date Dimension ending at 2010" border="0" height="210" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ExtendingtheDateDimensionSSAS_F85/image_3.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Date Dimension ending at 2010" width="141" /></p>
<p>
	To extend the date dimension further (remember there is no underlying source table), open SQL Server Management Studio, connect to Analysis Services and right click the Date Dimension to view its properties.</p>
<p>
	<img alt="Properties and Script" border="0" height="138" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ExtendingtheDateDimensionSSAS_F85/image_6.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Properties and Script" width="322" /></p>
<p>
	Click the Script button. This will produce the xmla script with an Alter statement in a new tab. Scroll down until you find CalendarEndDate shown here as 31 December 2010.</p>
<p>
	<img alt="Locate CalendarEndDate" border="0" height="152" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ExtendingtheDateDimensionSSAS_F85/image_12.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Locate CalendarEndDate" width="452" /></p>
<p>
	Change this to the new end date eg &lt;CalendarEndDate&gt;2020-12-31T00:00:00Z&lt;/CalendarEndDate&gt;, and click the Execute button from the toolbar to update the Server. Right click and Process the Date Dimension.</p>
<p>
	<img alt="Reprocess the dimension" border="0" height="106" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ExtendingtheDateDimensionSSAS_F85/image_11.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Reprocess the dimension" width="196" /></p>
<p>
	If you right click and browse the date dimension you will now see the Date dimension extends to the new end date specified in the altered xmla script.</p>
<p>
	<img alt="Date Dimension extended" border="0" height="353" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/ExtendingtheDateDimensionSSAS_F85/image_15.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Date Dimension extended" width="118" /></p>
<p>
	Any cube(s) that have facts recorded against these dates can now also be processed.</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/extending-the-date-dimension-analysis-services.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Windows 7 and DigitalPersona &amp;ndash; fingers up</title>
      <link>http://www.blue-chip.com.au/windows-7-and-digitalpersona--ndash-fingers-up.aspx</link>
      <pubDate>Sat, 05 Feb 2011 13:42:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/windows-7-and-digitalpersona--ndash-fingers-up.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/windows-7-and-digitalpersona--ndash-fingers-up.aspx</comments>
      <description><![CDATA[<p>
	Several brands of laptop come with built in Biometric devices, such as fingerprint readers. A lot of people have reported problems with their fingerprint readers no longer working after upgrading their laptops from Vista to Windows 7. I had the same problem with my Dell Studio 1737 and tried several suggested solutions from various blogs but I gave up when none of them worked. After months without it I decided to check to see if any new developments had occurred.</p>
<p>
	&nbsp;<img alt="The Fingerprint reader is not connected. Connect the reader" border="0" height="404" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_10.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="The Fingerprint reader is not connected. Connect the reader" width="592" /></p>
<p>
	There are 2 parts to the puzzle – the correct driver and the correct software is needed. Here the software is supplied by DigitalPersona, and it tells me The Fingerprint reader is not connected. Connect the reader. A better message would have been – The Device Driver is not compatible with this version of the software, please update the Device Driver.</p>
<p>
	&nbsp;<img alt="Device Manager shows AuthenTec" border="0" height="214" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_13.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Device Manager shows AuthenTec" width="403" /></p>
<p>
	A look at Device Manager on Windows 7 shows the Driver is supplied by AuthenTec Inc (actually it is supplied by the computer manufacturer Dell). The above screen shot shows the Allow the Computer to turn off this device set to false, as one person reported that this fixed their fingerprint reader problem but it had no effect. The real problem was the Driver.</p>
<p>
	<img alt="Driver version - old" border="0" height="301" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_16.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Driver version - old" width="382" /></p>
<p>
	The current Driver version was 2.0.0.18 (quite old) yet Windows 7 told me it was up to date and no driver update was needed.</p>
<p>
	<img alt="digitalPerson Version" border="0" height="232" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_19.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="digitalPerson Version" width="498" /></p>
<p>
	The software version from DigitalPersona was 4.02.3769</p>
<p>
	Going to the Dell support site with the <strong>service tag</strong> of the laptop still showed the latest driver compatibility with the operating system the unit was shipped with – Vista 32 bit. Windows 7 was not listed here.</p>
<p>
	<img alt="Dell Drivers and Downloads shows old driver for Vista" border="0" height="455" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_22.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Dell Drivers and Downloads shows old driver for Vista" width="565" /></p>
<p>
	However, ignoring the service tag and searching “By Product”, basically&nbsp; filtering on Studio Laptop 1737 brings you to the correct Driver where Windows 7 is listed under compatibility. So don't use the service tag for drivers after you upgrade the operating system.</p>
<p>
	<a href="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_24.png"><img alt="Correct Driver for Windows 7" border="0" height="445" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_thumb_8.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Correct Driver for Windows 7" width="535" /></a></p>
<p>
	After downloading and running the setup program</p>
<p>
	<img alt="Extract Driver for Authentec AES2810" border="0" height="225" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_27.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Extract Driver for Authentec AES2810" width="584" /></p>
<p>
	the installation proceeds, requiring a reboot.</p>
<p>
	<img alt="Authentec Fingerprint Software" border="0" height="355" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_30.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Authentec Fingerprint Software" width="483" /></p>
<p>
	Thereafter the Authentec AES2810 Driver version changes to 8.5.0.251. The DigitaPersona software remained at 4.02.3769, however it should be noted this is not the original version that shipped with the laptop, it had been upgraded in previous attempts to resolve the fingerprint reader problem with Windows 7.</p>
<p>
	<img alt="Driver version - after update" border="0" height="310" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_33.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Driver version - after update" width="387" /></p>
<p>
	Finally the reader works again with successful scanning.</p>
<p>
	&nbsp;<img alt="Successful finger scan" border="0" height="422" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/Windows7andDigitalPersonafingersup_14F44/image_39.png" style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Successful finger scan" width="599" /></p>
<p>
	All accounts (multi account laptop) now work for login as well as web sites selected to authenticate via the fingerprint reader. Its a nice feature to be able to use, just swipe your finger, no passwords to remember.</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/windows-7-and-digitalpersona--ndash-fingers-up.aspx'>...</a>]]></description>
    </item>
    <item>
      <title>Deploy mojoPortal sites to Hosting Provider - Part 2</title>
      <link>http://www.blue-chip.com.au/deploy-mojoportal-sites-to-hosting-provider-part-2.aspx</link>
      <pubDate>Sat, 05 Feb 2011 12:33:00 GMT</pubDate>
      <guid>http://www.blue-chip.com.au/deploy-mojoportal-sites-to-hosting-provider-part-2.aspx</guid>
      <author>Ertan Sertcan</author>
      <comments>http://www.blue-chip.com.au/deploy-mojoportal-sites-to-hosting-provider-part-2.aspx</comments>
      <description><![CDATA[<p>
	In a previous post, I outlined the steps needed to take your mojoPortal SQL Server Database, back it up, and restore it on to your hosting providers database.</p>
<p>
	In this post, I’ll outline how to configure the web site. My hosting provider (at time of writing) is <a href="http://www.arvixe.com" target="_blank">Arvixe</a>. They had a good hosting deal for SQL Server and ASP.Net content management systems of which mojoPortal is one. As mentioned, any hosting provider will supply you with a URL which is your control panel’s web address, from where all web, file, database configuration is done. They will also supply you an FTP address so you can upload your files with something like <a href="http://filezilla-project.org/" target="_blank">FileZilla</a>.</p>
<p>
	Most hosting providers will give you a free domain name (mydomain.com) or you can point your existing domain name to their IP. If I enter the Domain name they gave me at Arvixe for the initial account (eg mydomain.com), I get a landing page as follows:</p>
<p>
	<img alt="Landing Page" border="0" height="157" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_11.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Landing Page" width="497" /></p>
<p>
	So how does this help with getting a CMS like mojoPortal to display your web site? Remember we are uploading mojoPortal site(s) developed offline, uploading them to a web hosting provider.</p>
<p>
	Lets say the hosting company gave you a domain with your account mydomain.com but this is not your company or other URL that you built your mojoPortal site with. You need to add a new domain which matches the site you built offline with mojoPortal.</p>
<p>
	The Control Panel will have Domain Name administration functions. Add a top level domain if you want to use a domain name other than the free one the hosting provider gave you (if any). Often this is your business domain name you registered a long time ago. If you’re happy to use the free domain given by the hosting company and built the mojoPortal site with the same name, there’s no need to Add a new Domain.</p>
<p>
	<img alt="Add New Domain" border="0" height="217" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_23.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Add New Domain" width="414" /></p>
<p>
	Enter your mojoPortal sites Primary site domain name. Multisite setup’s run off the primary site. For example you’d enter mybusinessname.com or whatever the domain name is.</p>
<p>
	<img alt="Enter your mojoPortal sites domain name" border="0" height="230" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_26.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Enter your mojoPortal sites domain name" width="407" /></p>
<p>
	The Control Panel will then add the Domain to your account. You can have as many domains as your account allows.</p>
<p>
	<img alt="Adding Domain" border="0" height="110" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_29.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Adding Domain" width="244" /></p>
<p>
	<img alt="List of your Domains" border="0" height="172" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_32.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="List of your Domains" width="381" /></p>
<p>
	Once each Domain is setup, you can administer each one separately, the web site is already setup with a wwwroot folder for each top level domain, ready for you to FTP the mojoPortal files. As you need to contact your domain name registrar to change your domain name Primary and Secondary Name servers to point to that of your hosting provider (if you just created an account) and this can take time to propagate, the hosting provider will commonly provide you with a temporary URL to test your site.</p>
<p>
	<img alt="Temporary site imeediately available" border="0" height="249" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_35.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Temporary site imeediately available" width="408" /></p>
<p>
	Using the Control Panel you can navigate to various web site settings for your soon to be live mojoPortal site.</p>
<p>
	&nbsp; <img alt="Basic Web Settings" border="0" height="393" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_8.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Basic Web Settings" width="403" /></p>
<p>
	You need to configure some settings then upload mojoPortal to the wwwroot folder of your hosting account. Under the Extensions Tab of your hosting account’s Web Site Settings</p>
<p>
	<img alt="Configure Settings" border="0" height="154" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_14.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Configure Settings" width="445" /></p>
<p>
	Change ASP.Net to 4.0 Integrated Pipeline if you downloaded mojoPortal for .Net 4.0</p>
<p>
	<img alt="Change to .Net 4.0 Integrated Pipeline" border="0" height="130" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_17.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Change to .Net 4.0 Integrated Pipeline" width="185" /></p>
<p>
	That’s basically all you need for mojoPortal but there are many configuration settings you can set. If you don’t need PHP or CGI-BIN or Cold Fusion you can disable these, reducing your sites surface area of attack.</p>
<p>
	<img alt="Many Configuration Settings" border="0" height="484" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_20.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Many Configuration Settings" width="283" /></p>
<p>
	Zip the mojoPortal folder contents on your local PC and Upload to your domain’s wwwroot folder. Since each top level domain has its own folder, each site could use other CMS’s, including PHP based ones. You can have www.site1.com, www.site2.com, www.site3.com each with its own folder structure with wwwroot at the starting point. www.site1 .com could be a mojoPortal site capable of running multiple sites with just the one install of mojoPortal. Hence if www.site1.com was the primary mojoPortal site, I could setup www.childsiteA.com and www.childsiteB.com to all run off the one mojoPortal setup. I’ll show how this is done in the Control Panel later.</p>
<p>
	Don't zip the wwwroot folder from your PC, just highlight all the files and folders off the root. wwwroot has certain permissions already set by the hosting company that you may want to preserve.</p>
<p>
	<img alt="Zip your mojoPortal site so you can FTP it" border="0" height="238" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_16.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Zip your mojoPortal site so you can FTP it" width="292" /></p>
<p>
	The Zip file is sent to the web site’s wwwroot folder. On setup it already contains a web.config and a default.aspx page which is the “Landing” page shown earlier. When the file is Unzipped, these will be replaced by the mojoPortal versions.</p>
<p>
	&nbsp;<img alt="FTP zip file to wwwroot on Hosting Server" border="0" height="189" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_34.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="FTP zip file to wwwroot on Hosting Server" width="319" /></p>
<p>
	<img alt="Unzip via File Manager on hosting providers control panel" border="0" height="82" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_38.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Unzip via File Manager on hosting providers control panel" width="556" /></p>
<p>
	<img alt="Unzip in progress" border="0" height="136" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_41.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Unzip in progress" width="301" /></p>
<p>
	You should end up with all your mojoPortal files under wwwroot, just as it appears on your local PC.</p>
<p>
	<img alt="Unzipped files on wwwroot" border="0" height="327" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_44.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Unzipped files on wwwroot" width="257" /></p>
<p>
	Edit the web.config as per whatever settings you require for SMTP, Caching and so on. Edit the user.config database connection settings with the hosting providers login and password. The control panel File Manager provides a basic editor.</p>
<p>
	You can test the site with the temporary URL obtained when you setup the domain or your sites URL if your registrar setup is correct. If your database settings are correct, the mojoPortal site should come up.</p>
<p>
	What about the<strong> second site</strong>? Remember I had 2 sites in the /Data folder /Sites/1 (Primary – which is the Top Level Domain added via Control Panel) and /Sites/2 which is a completely separate web site defined within mojoPortal. The database restored to the hosting provider contains details for the second site, the files uploaded via FTP also contain the 2nd site.</p>
<p>
	You just need to <strong>create a domain Alias</strong> (should be an option on your control panel – below shown as last option)</p>
<p>
	<img alt="Second mojoPortal site off Primary - create a Domain Alias" border="0" height="234" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_22.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Second mojoPortal site off Primary - create a Domain Alias" width="472" /></p>
<p>
	<img alt="Point secondary child sites to main mojoPortal site" border="0" height="276" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_37.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Point secondary child sites to main mojoPortal site" width="542" /></p>
<p>
	In IIS, it is possible to host multiple mojoPortal sites using a shared ip address, but this requires adding host headers in IIS for each site that will be handled by mojoPortal. In effect this is what we are doing. When we add the 2nd site’s domain to “point” to an existing primary mojoPortal site its is a domain alias, mojoPortal will render the site. And remember your domain name registrar must be updated to point to the same IP or Name Servers as the Primary site.</p>
<p>
	<img alt="Top Level and Domain Alias for mojoPortal" border="0" height="275" src="http://www.blue-chip.com.au/Data/Sites/1/WindowsLiveWriter/DeploymojoPortalsitestoHostingProviderPa_AF13/image_45.png" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Top Level and Domain Alias for mojoPortal" width="524" /></p>
<p>
	In summary your hosting provider will support IIS 7 or later and SQL Server. You need to create a top level domain for the Primary mojoPortal site. This top level domain’s name is what you called the web site in mojoPortal (URL’s must resolve for images, style sheets and so on so you cant develop a mojoPortal site as site1.com and host it as a top level domain siteA.com). If you have one or more secondary sites running off the primary mojoPortal site, you need to create a Domain Alias for each secondary site – pointing to the domain of the primary site.</p>
<p>
	Every top level domain created will have a web.config and a default.aspx file in its own wwwroot folder. You just need to replace these when you FTP up your mojoPortal files. Secondary sites run off the Primary site so they use the same web.config as the primary site, since secondary sites are Domain Aliases, they don't have their own wwwroot folders anyway, relying only on the top level domain to which they are pointing too.</p>
<br /><a href='http://www.blue-chip.com.au'>Ertan Sertcan</a>&nbsp;&nbsp;<a href='http://www.blue-chip.com.au/deploy-mojoportal-sites-to-hosting-provider-part-2.aspx'>...</a>]]></description>
    </item>
  </channel>
</rss>
