<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-948243342799425314</id><updated>2012-01-17T14:51:06.225Z</updated><category term='tech problems'/><category term='sql server reporting services'/><category term='datediff weekdays'/><category term='opendatasource'/><category term='openrowset'/><category term='fileupload control'/><category term='sql server 2008 express r2'/><category term='listview'/><category term='apple'/><category term='firebug'/><category term='jira'/><category term='Posting Code in Blog Posts'/><category term='outlook 2007'/><category term='validation'/><category term='browsers'/><category term='software development'/><category term='firefox'/><category term='iphone'/><category term='excel'/><category term='css'/><category term='useful tools'/><category term='spelling check'/><category term='windows'/><category term='d-link dns-320'/><category term='postbacks'/><category term='mstsc'/><category term='windows registry'/><category term='vb.net'/><category term='web.config'/><category term='.net framework'/><category term='tech'/><category term='jQuery'/><category term='iis'/><category term='visual studio 2010 web developer express'/><category term='microsoft excel'/><category term='datatable'/><category term='atlassian jira'/><category term='error handling'/><category term='ajax'/><category term='sql server agent'/><category term='dtexec'/><category term='GridView'/><category term='atd'/><category term='css3'/><category term='403 forbidden'/><category term='code behind'/><category term='HTC Desire HD'/><category term='Lenovo W510'/><category term='ssis'/><category term='sql server'/><category term='ie8'/><category term='windowpad'/><category term='palm pre'/><category term='visual studio web developer 2008 express'/><category term='tech review'/><category term='asp.net ajax combo'/><category term='repeater'/><category term='opinion'/><category term='ie6'/><category term='dell studio 17'/><category term='after the deadline'/><category term='visual studio 2010'/><category term='asp.net'/><category term='typed dataset'/><category term='regular expressions'/><category term='remote desktop'/><category term='sql server error'/><category term='syntax highlighter'/><category term='rumour'/><category term='power tools'/><category term='sql server integration services'/><category term='c#.net'/><category term='web design'/><category term='utilities'/><category term='firebug lite'/><title type='text'>atom innovation</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>81</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3755676686581724516</id><published>2012-01-17T14:41:00.002Z</published><updated>2012-01-17T14:51:06.233Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Solved: Visual Studio 2010: ASP.NET project - can't add web reference</title><content type='html'>I hadn't worked on a project for a while (since upgrading to Visual Studio 2010), and I needed to add a web reference to get it to compile. The normal method is just to right-click on your project name in Solution Explorer and click Add Web Reference.&lt;br /&gt;&lt;br /&gt;But I had no option to Add Web Reference, only an option to 'Add Service Reference' which seems to be designed for WCF references. &lt;br /&gt;&lt;br /&gt;It's a legacy project though, so I needed to add the reference in the legacy format - adding a service reference creates different components in your project than a web reference. &lt;br /&gt;&lt;br /&gt;I got round it by:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://weblogs.asp.net/jeffwids/archive/2009/12/29/how-to-change-the-target-framework-version-for-a-visual-basic-project.aspx" target="_blank"&gt;Change the target framework&lt;/a&gt; to .NET 2.0&lt;br /&gt;2. Close and reopen the solution - you should see the option to Add Web Reference. &lt;br /&gt;3. Add the web reference.&lt;br /&gt;4. Change the target framework back to whatever you had before. &lt;br /&gt;5. Close and reopen the project. &lt;br /&gt;6. Continue upon your way.&lt;br /&gt;&lt;br /&gt;This might not work for everyone since I don't really know why the option to add web reference disappeared in the first place - but it worked for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3755676686581724516?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3755676686581724516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3755676686581724516&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3755676686581724516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3755676686581724516'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2012/01/solved-visual-studio-2010-aspnet.html' title='Solved: Visual Studio 2010: ASP.NET project - can&apos;t add web reference'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6867381213613573926</id><published>2011-12-16T10:44:00.003Z</published><updated>2011-12-16T10:52:04.919Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='windowpad'/><category scheme='http://www.blogger.com/atom/ns#' term='utilities'/><title type='text'>Lots of screens? Lots of windows? WindowPad!</title><content type='html'>I use three screens for work, and I usually have about 12-15 windows open at once. I'm also a bit precious about the window sizes and positions of the things I'm working with - especially when using Visual Studio or another tool with a lot of dockable windows.&lt;br /&gt;&lt;br /&gt;I hate having to drag windows about and manually resize them. Enter &lt;a href="http://www.autohotkey.com/forum/topic21703.html" target="_blank"&gt;WindowPad&lt;/a&gt;! &lt;br /&gt;&lt;br /&gt;It's a little utility which consists of an executable file and an ini file for configuration - you just put it in your Startup folder to use.&lt;br /&gt;&lt;br /&gt;WindowPad uses a virtual "pad" to arrange windows, where you can use the Numpad to move and resize windows to fill the appropriate sections of your screens. &lt;br /&gt;&lt;br /&gt;Features include: &lt;br /&gt;- Move windows within the current monitor or between monitors (in multi-monitor setups). &lt;br /&gt;- Customize hotkeys via WindowPad.ini with AutoHotkey-like command syntax. &lt;br /&gt;- Define custom commands as labels or functions in WindowPad.ahk. &lt;br /&gt;- Execute WindowPad commands specified on the command-line. &lt;br /&gt;&lt;br /&gt;This is one of the tools mentioned in my &lt;a href="http://atominnovation.blogspot.com/2011/12/power-tools-every-net-developer-should.html" target="_blank"&gt;.NET tools post&lt;/a&gt;, but it's the best utility I've discovered in a long time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6867381213613573926?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6867381213613573926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6867381213613573926&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6867381213613573926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6867381213613573926'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/12/lots-of-screens-lots-of-windows.html' title='Lots of screens? Lots of windows? WindowPad!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5816184252498813426</id><published>2011-12-09T12:49:00.003Z</published><updated>2011-12-09T12:52:33.131Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='useful tools'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010 web developer express'/><category scheme='http://www.blogger.com/atom/ns#' term='utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='power tools'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Power tools every .NET developer should have</title><content type='html'>Working every day within a Windows environment, you get used to your own specific way of customising your workspace. &lt;br /&gt;&lt;br /&gt;I'm always on the look out for ways to make my laziness less of an issue by being able to do common tasks more quickly, and &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2011UltimateDeveloperAndPowerUsersToolListForWindows.aspx" target="_blank"&gt;Scott Hanselman's Ultimate Developer and Power Users Tool List for Windows&lt;/a&gt; is brilliant.&lt;br /&gt;&lt;br /&gt;There are some really useful applications on there and in particular I liked WindowPad because it helps you to quickly arrange the various Visual Studio windows on your screens rather than having to drag and resize constantly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5816184252498813426?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5816184252498813426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5816184252498813426&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5816184252498813426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5816184252498813426'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/12/power-tools-every-net-developer-should.html' title='Power tools every .NET developer should have'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3910905411540314362</id><published>2011-11-23T11:55:00.004Z</published><updated>2011-12-14T11:56:31.995Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Visual Studio: Selecting which browser to debug with</title><content type='html'>I love Google Chrome. It's fast to start up, fast to render pages, it knows how to use CSS and it's just generally excellent.&lt;br /&gt;&lt;br /&gt;I'm less keen on IE though. However, since it's the most popular browser that's the one I tend to debug my web applications with. But Visual Studio kept launching Chrome instead of IE - turns out it's a simple fix:&lt;br /&gt;&lt;br /&gt;1) Right click on a .aspx page in your solution explorer&lt;br /&gt;2) Select the "browse with" context menu option&lt;br /&gt;3) In the dialog you can select or add a browser. For example, if you want Firefox in the list click "add" and point to the firefox.exe filename&lt;br /&gt;4) Click the "Set as Default" button to select the default browser when you run any page on the site.&lt;br /&gt;&lt;br /&gt;Works. Life made easier. &lt;br /&gt;&lt;br /&gt;Solution bumped from &lt;a href="http://stackoverflow.com/questions/79954/visual-studio-opens-the-default-browser-instead-of-internet-explorer" target="_blank"&gt;Stackoverflow&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;P.S.: If you don't see a 'Browse with' option - check you're not debugging already! Stop debugging and the option will appear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3910905411540314362?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3910905411540314362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3910905411540314362&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3910905411540314362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3910905411540314362'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/11/visual-studio-selecting-which-browser.html' title='Visual Studio: Selecting which browser to debug with'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-8341033271802626798</id><published>2011-08-30T20:37:00.003+01:00</published><updated>2011-08-30T20:40:39.750+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mstsc'/><category scheme='http://www.blogger.com/atom/ns#' term='remote desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Windows Remote Desktop: The terminal server has exceeded maximum number of allowed connection, mstsc</title><content type='html'>I kept getting the dreaded 'The terminal server has exceeded maximum number of allowed connection' when attempting to log onto a remote server. I must've forgotten to log out and just clicked close on the mstsc session!&lt;br /&gt;&lt;br /&gt;The answer:&lt;br /&gt;&lt;br /&gt;You can start a control session to the server and logoff your other connections. Please always use "LogOff" when you leave remote desktop.&lt;br /&gt;&lt;br /&gt;Open Command Prompt.&lt;br /&gt;Type: "mstsc /admin".&lt;br /&gt;Remote Desktop Connection will start. Type the computer name or IP address of the computer you want to connect to in the Computer box.&lt;br /&gt;Configure any other desired options, and then click Connect.&lt;br /&gt;&lt;br /&gt;Solution from the page at &lt;a href="http://www.dedicatedsqlserver.com/HowTo/Terminal_Server_Maximum_Connections.aspx"target="_blank"&gt;this link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-8341033271802626798?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/8341033271802626798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=8341033271802626798&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8341033271802626798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8341033271802626798'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/08/windows-remote-desktop-terminal-server.html' title='Windows Remote Desktop: The terminal server has exceeded maximum number of allowed connection, mstsc'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5674668028009224387</id><published>2011-08-11T10:11:00.003+01:00</published><updated>2011-08-11T10:19:49.159+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>ASP.NET: Scrollable GridView with Fixed Headers: jQuery</title><content type='html'>Sometimes I find that it's almost impossible to achieve something which should really be incredibly straightforward. Maybe it's because I'm an idiot, or maybe it's because Microsoft have missed a trick.&lt;br /&gt;&lt;br /&gt;In this case, I needed to be able to freeze the colum headers of a GridView and make it vertically scrollable. I tried about a dozen different methods, from pure CSS to various JavaScript hacks, and even attempting to do it server-side to try to ensure browser compatibility. I won't link to any of the solutions I tried except one, since only one of them actually worked.&lt;br /&gt;&lt;br /&gt;As usual, it was &lt;a href="http://plugins.jquery.com/project/ScrollableGridViewPlugin" target="_blank"&gt;jQuery to the rescue&lt;/a&gt;. A simple plugin which you can use to freeze the column headers and add a vertical scrollbar, and with minimal effort. It works as tested in Firefox 3, Chrome and Internet Explorer 8 - though sometimes the column headers are a couple of pixels out of line here or there.&lt;br /&gt;&lt;br /&gt;Anyway, there's a &lt;a href="http://www.aspsnippets.com/Articles/Scrollable-GridView-with-Fixed-Headers-using-jQuery-Plugin.aspx" target="_blank"&gt;nice article describing how to use&lt;/a&gt; it on ASP Snippets.&lt;br /&gt;&lt;br /&gt;The only drawback I found was that I couldn't really get it to behave properly when the window was resized - but I suspect that was my poor implementation of the plugin rather than a fault with the jQuery code itself.&lt;br /&gt;&lt;br /&gt;In conclusion: &lt;span style="font-weight:bold;"&gt;Microsoft&lt;/span&gt;: Get your act together and make this a feature that can be enabled via a property. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5674668028009224387?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5674668028009224387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5674668028009224387&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5674668028009224387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5674668028009224387'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/08/aspnet-scrollable-gridview-with-fixed.html' title='ASP.NET: Scrollable GridView with Fixed Headers: jQuery'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1681337246970075971</id><published>2011-07-31T21:09:00.006+01:00</published><updated>2011-07-31T21:43:16.571+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jira'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server 2008 express r2'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='atlassian jira'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Atlassian JIRA Startup Failed: Configuring JIRA to access SQL Server 2008 Express R2</title><content type='html'>I recently upgraded my SQL Server 2008 Express Edition with Advanced Services to R2, and found that my JIRA installation stopped working (received Tomcat 404 errors).&lt;br /&gt;&lt;br /&gt;I tried everything, but could not get it to work - I kept getting 'connection refused' errors in the JIRA logs. I hadn't modified my server.xml configuration since the upgrade, and I checked that the protocols in SQL Server Configuration Manager were enabled on Port 1433.&lt;br /&gt;&lt;br /&gt;Something wasn't right - even with the same configuration as before I just could not get JIRA to start.&lt;br /&gt;&lt;br /&gt;Eventually, I found the answer which worked for me:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Run config.bat in the /bin folder of the JIRA installation folder.&lt;/li&gt;&lt;li&gt;Click the Database Tab:&lt;/li&gt;&lt;li&gt;&lt;b&gt;Database type:&lt;/b&gt; SQL Server&lt;/li&gt;&lt;li&gt;&lt;b&gt;Hostname:&lt;/b&gt; localhost (Or your server name. Note: NOT "localhost\SQLExpress")&lt;/li&gt;&lt;li&gt;&lt;b&gt;Port:&lt;/b&gt; 49374 (Find this value in your registry, in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp for your SQL instance name. i.e. SQLEXPRESS. You can edit your registry by typing 'regedit' at the command line.) &lt;/li&gt;&lt;li&gt;&lt;b&gt;Database&lt;/b&gt;: jiradb&lt;/li&gt;&lt;li&gt;&lt;b&gt;Username&lt;/b&gt;: jirauser&lt;/li&gt;&lt;li&gt;&lt;b&gt;Password&lt;/b&gt;: *****&lt;/li&gt;&lt;li&gt;&lt;b&gt;Schema&lt;/b&gt;: jiraschema&lt;/li&gt;&lt;li&gt;&lt;b&gt;Connection &lt;/b&gt;Pool: 20&lt;/li&gt;&lt;li&gt;Click Test Connection.&lt;/li&gt;&lt;/ul&gt;Hopefully the utility will return 'Connection successful.'. Restart the Atlassian JIRA service and you should find that you are able to access your JIRA installation.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Worked for me - I'm not sure why I needed to do this for R2. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More info in the comments attached to this &lt;a href="http://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+SQL+Server+2008" target="_blank"&gt;forum post&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1681337246970075971?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1681337246970075971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1681337246970075971&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1681337246970075971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1681337246970075971'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/07/atlassian-jira-startup-failed.html' title='Atlassian JIRA Startup Failed: Configuring JIRA to access SQL Server 2008 Express R2'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1107562192495687600</id><published>2011-07-21T15:20:00.010+01:00</published><updated>2011-07-21T15:39:25.204+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='openrowset'/><category scheme='http://www.blogger.com/atom/ns#' term='windows registry'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='opendatasource'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft excel'/><title type='text'>SQL Server: Columns truncated to 255 characters when using OPENROWSET or OPENDATASOURCE to import from Excel</title><content type='html'>I was using the SQL command OPENROWSET to directly import a load of text from an Excel spreadsheet to my database. The columns were of varying widths, some up to 3,000 characters. &lt;br /&gt;&lt;br /&gt;The problem I experienced was that for some columns the output of the statement was being truncated to 255 characters - but not for all of them. I couldn't understand why this would happen and tried various combinations of OPENROWSET and OPENDATASOURCE, but to no avail. &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;sp_configure &amp;#039;show advanced options&amp;#039;, 1&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;sp_configure &amp;#039;Ad Hoc Distributed Queries&amp;#039;, 1&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;    INSERT INTO tblRichTextFields (Requester,feet,approval) &lt;br /&gt;    SELECT * FROM OPENDATASOURCE(&amp;#039;Microsoft.ACE.OLEDB.12.0&amp;#039;,&amp;#039;Data Source=&amp;quot;C:\RichtextFields.xls&amp;quot;;Extended Properties=&amp;#039;&amp;#039;Excel 12.0&amp;#039;&amp;#039;&amp;#039;)...[Sheet1$]&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;sp_configure &amp;#039;show advanced options&amp;#039;, 1&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;sp_configure &amp;#039;Ad Hoc Distributed Queries&amp;#039;, 0&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;sp_configure &amp;#039;show advanced options&amp;#039;, 0&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The only thing I could think of was that it was something to do with the Excel cell formats. I compared the columns which were being truncated to the column which was not, but they were the same. I tried changing them all to Text to see if that made any difference. Still truncated.&lt;br /&gt;&lt;br /&gt;I couldn't find much more on Google, nor in my brain - but eventually I did find a fix which proved me right - it was some underhanded 'guesswork' on Microsoft's part - surprise, surprise. See this quote:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;"Your data may be truncated to 255 characters if the first 8 records for the field(s) being truncated contain 255 or fewer characters. The Microsoft Excel ODBC driver will, by default, scan the first 8 rows of your data to determine the type of data in each column."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I changed the Registry Setting which controls the 'Excel format guessing' behaviour from 'on' to 'off', logged out and back in - and Hey Presto! it worked.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting:&lt;/span&gt; &lt;pre class="brush: sql"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Mi­­crosoft\Jet\4.0\Engines\Excel­\­TypeGuessRows&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Change the value from 8 hex to 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't think this fix will work in every situation and I haven't considered every possible implication of changing this registry setting, but if your text is being truncated like this - this is worth a try. Take a backup of your registry before changing it and it's not my fault if you Michael Berk it up!&lt;br /&gt;&lt;br /&gt;Here's some &lt;a href="http://support.microsoft.com/kb/189897" target="_blank"&gt;detailed info on the Microsoft website&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1107562192495687600?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1107562192495687600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1107562192495687600&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1107562192495687600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1107562192495687600'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/07/sql-server-columns-truncated-to-255.html' title='SQL Server: Columns truncated to 255 characters when using OPENROWSET or OPENDATASOURCE to import from Excel'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7964134650913468601</id><published>2011-07-19T14:35:00.003+01:00</published><updated>2011-07-19T14:40:16.945+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software development'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>97 Things Every Programmer Should Know</title><content type='html'>Opinions are often divided on the best approach to programming and software development, but there's a really nice book with 97 points which are pretty tough to argue with.&lt;br /&gt;&lt;br /&gt;It's by a bloke called Kevlin Henney, and it's called &lt;a href="http://www.amazon.co.uk/Things-Every-Programmer-Should-Know/dp/0596809484/ref=sr_1_1?ie=UTF8&amp;qid=1311082617&amp;sr=8-1" target="_blank"&gt;97 Things Every Programmer Should Know: Collective Wisdom from the Experts&lt;/a&gt;. There are some really excellent points in there, and you can see the &lt;a href="http://programmer.97things.oreilly.com/wiki/index.php/Contributions_Appearing_in_the_Book" target="_blank"&gt;content of the book&lt;/a&gt; on O'Reilly's commons wiki.&lt;br /&gt;&lt;br /&gt;It covers topics such as techinical debt, the importance of good quality user stories (test plans) and good approaches to test driven development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7964134650913468601?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7964134650913468601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7964134650913468601&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7964134650913468601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7964134650913468601'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/07/97-things-every-programmer-should-know.html' title='97 Things Every Programmer Should Know'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-68072432280673784</id><published>2011-06-09T09:11:00.002+01:00</published><updated>2011-06-09T09:15:09.524+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='datediff weekdays'/><title type='text'>SQL Server: DateDiff with Weekdays</title><content type='html'>I needed a simple way to work out the number of &lt;span style="font-weight:bold;"&gt;weekdays &lt;/span&gt;between two dates for a report (not worried about holidays).&lt;br /&gt;&lt;br /&gt;The native datediff function in T-SQL works with calendar days, so I needed a custom function. I lifted this off a forum and modified it a bit:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fnDateDiffWeekdays]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))&lt;br /&gt; DROP FUNCTION [dbo].[fnDateDiffWeekdays]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;=============================================&lt;br /&gt;Description: Calculate datediff for weekdays&lt;br /&gt;Usage:   select dbo.fnDateDiffWeekdays('2011-05-09 09:04:22.593','2011-06-09 09:04:22.593')&lt;br /&gt;=============================================&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;CREATE function dbo.fnDateDiffWeekdays&lt;br /&gt;(&lt;br /&gt; @fromdate datetime,&lt;br /&gt; @todate datetime&lt;br /&gt;)&lt;br /&gt;RETURNS int&lt;br /&gt;AS &lt;br /&gt;begin&lt;br /&gt; declare @procdate datetime, @enddate datetime&lt;br /&gt; declare @weekdays int&lt;br /&gt; set @procdate = @fromdate &lt;br /&gt; set @weekdays = 0&lt;br /&gt;&lt;br /&gt;while (@procdate &lt; @todate) &lt;br /&gt;begin&lt;br /&gt; if (datepart(dw, @procdate + 1) &lt;&gt; 1) and (datepart(dw, @procdate + 1) &lt;&gt; 7)&lt;br /&gt; &lt;br /&gt;  set @weekdays = @weekdays + 1&lt;br /&gt;  set @procdate = dateadd(d, 1, @procdate)&lt;br /&gt; &lt;br /&gt;end&lt;br /&gt;---&lt;br /&gt;if @todate is null &lt;br /&gt;set @weekdays = null&lt;br /&gt;&lt;br /&gt;return @weekdays&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Worked fine in my testing!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-68072432280673784?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/68072432280673784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=68072432280673784&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/68072432280673784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/68072432280673784'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/06/sql-server-datediff-with-weekdays.html' title='SQL Server: DateDiff with Weekdays'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2094392381959704054</id><published>2011-05-10T16:25:00.007+01:00</published><updated>2011-05-10T20:48:32.284+01:00</updated><title type='text'>ASP.NET: Regular Expression client side date validation using "d MMMM yyyy" format</title><content type='html'>In my apps, I like to use the AJAX CalendarExtender control to allow the user to select dates from the calendar picker. I also like to allow the display of the full date format since I believe it to be more readable, for example&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;31 December 2012&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The problem is, I find it really tough to validate this date format and even when I tried to switch to other date formats and change the localization settings in web.config, I still had no real success. I tried CompareValidators, CustomValidators and various combinations of RegularExpressionValidator but simply could not get it to work.&lt;br /&gt;&lt;br /&gt;Eventually, I found a regular expression which pretty much does the trick. I don't believe it’s over-engineering the solution, because I could not find another solution which works.&lt;br /&gt;&lt;br /&gt;Basically I added the regular expression to my web.config file so that it was only listed in one place, should I need to change it. Then I created a little shared function which returns the RegEx, and on Page_Load I set the ValidationExpression property of the RegularExpressionValidator controls to the result of the function, and therefore to the RegEx.&lt;br /&gt;&lt;br /&gt;Here's the code:&lt;br /&gt;&lt;strong&gt;Page Markup&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;&amp;lt;%@ Register Assembly=&amp;quot;AjaxControlToolkit&amp;quot; Namespace=&amp;quot;AjaxControlToolkit&amp;quot; TagPrefix=&amp;quot;asp&amp;quot; %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:TextBox ID=&amp;quot;txtStartDate&amp;quot; runat=&amp;quot;server&amp;quot; AutoPostBack=&amp;quot;true&amp;quot; &amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;lt;asp:CalendarExtender ID=&amp;quot;calStartDate&amp;quot; runat=&amp;quot;server&amp;quot; TargetControlID=&amp;quot;txtStartDate&amp;quot; Format=&amp;quot;dd MMMM yyyy&amp;quot;&amp;gt;&amp;lt;/asp:CalendarExtender&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:RegularExpressionValidator ID=&amp;quot;reValStartDate&amp;quot; runat=&amp;quot;server&amp;quot; ControlToValidate=&amp;quot;txtStartDate&amp;quot;&lt;br /&gt;         ErrorMessage=&amp;quot;Enter a valid date&amp;quot; &amp;gt;&amp;lt;/asp:RegularExpressionValidator&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Code Behind&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;br /&gt;If Not Page.IsPostBack Then&lt;br /&gt;reValStartDate.ValidationExpression = UIUtils.DateValidatorRegEx()&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;summary&amp;gt;&lt;br /&gt;&amp;#039;&amp;#039;&amp;#039; Return the regular expression used to validate dates&lt;br /&gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;/summary&amp;gt;&lt;br /&gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;br /&gt;Public Shared Function DateValidatorRegEx() As String&lt;br /&gt;Return ConfigurationManager.AppSettings(&amp;quot;DateValidatorRegEx&amp;quot;)&lt;br /&gt;End Function&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Web.Config&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;&amp;lt;add key="DateValidatorRegEx" value="^(?:((31 (January|March|May|July|August|October|December))|((([0-2]\d)|30) (January|March|April|May|June|July|August|September|October|November|December))|(([01]\d|2[0-8]) February))|(29 February(?=-((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))) ((1[6-9]|[2-9]\d)\d{2})$"/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This solution isn't perfect, because the above validator does not allow for leap years (i.e. 29 February 2008 was a valid date), and I don't really like having to explicitly bind the ValidationExpression property of every date validation control in the code behind. I think it would have been better to set the ValidationExpression in the markup and directly reference the function result, but I couldn't get that to work. Apparently you can use a CodeExpressionBuilder to set server side control properties using code blocks, but I felt that &lt;strong&gt;would &lt;/strong&gt;be over-engineering the solution.&lt;br /&gt;&lt;br /&gt;Anyway, I hope this is of use to someone. I'll certainly be using this method in future projects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2094392381959704054?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2094392381959704054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2094392381959704054&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2094392381959704054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2094392381959704054'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/05/aspnet-regular-expression-client-side.html' title='ASP.NET: Regular Expression client side date validation using &quot;d MMMM yyyy&quot; format'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6049053210656964021</id><published>2011-01-28T13:35:00.007Z</published><updated>2011-01-28T13:56:16.690Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTC Desire HD'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>HTC Desire HD turns itself off: Solved!</title><content type='html'>&lt;p&gt;I recently bought an &lt;a href="http://www.htc.com/www/product/desirehd/overview.html" target="_blank"&gt;HTC Desire HD&lt;/a&gt; to replace my iPhone 3GS.&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_NfRmgpXyffo/TULH1C2T8qI/AAAAAAAAAIY/-a7psU4yf5c/s1600/htcdesire.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 275px; DISPLAY: block; HEIGHT: 183px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5567231803495019170" border="0" alt="" src="http://4.bp.blogspot.com/_NfRmgpXyffo/TULH1C2T8qI/AAAAAAAAAIY/-a7psU4yf5c/s400/htcdesire.jpg" /&gt;&lt;/a&gt;It's an excellent phone in many ways, but has one or two flaws. When on a business trip I set my alarm for the next morning and left it switched on and plugged into the charger. I had never used the Alarm Clock app before.&lt;br /&gt;&lt;br /&gt;Since I had been caught out recently by the &lt;a href="http://www.macworld.com/article/156793/2011/01/ios_alarm.html" target="_blank"&gt;iOS alarm clock bug&lt;/a&gt; on January 1 and 2, I didn't entirely trust that the alarm would go off. &lt;br /&gt;&lt;br /&gt;My mistrust was well placed, and it was lucky I set the bedside alarm too, because the phone alarm didn't go off. The phone's power had cut out.&lt;br /&gt;&lt;br /&gt;When I turned it back on, much to my dismay the phone kept turning itself off at random every 20-30 minutes and for no apparent reason. I couldn't figure out what was going on and thought maybe it was something to do with a loose connection in the phone or the battery.&lt;br /&gt;&lt;br /&gt;I was about to send the phone back under warranty, and thought I should really spend some time to see if I can find the answer before going to the trouble of being phoneless for a few days while it gets fixed.&lt;br /&gt;&lt;br /&gt;So I eventually stumbled across the answer on &lt;a href="http://androidforums.com" target="_blank"&gt;AndroidForums&lt;/a&gt; (The link takes you to the main page because I found the post last night and since haven't been able to locate it).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.&lt;/strong&gt; Turn phone off and remove the battery, SIM, and memory card.&lt;br /&gt;&lt;strong&gt;2.&lt;/strong&gt; Leave the phone for a minute and put the memory card and battery back in (not the SIM).&lt;br /&gt;&lt;strong&gt;3.&lt;/strong&gt; Turn back on, allow to boot and then switch off again.&lt;br /&gt;&lt;strong&gt;4.&lt;/strong&gt; Take the battery out again, wait a moment and put back in with SIM too. Turn on.&lt;br /&gt;&lt;br /&gt;Apparently this type of reboot clears out some files that a normal restart wont, and causes certain programs that are set to start (and that could be the cause of the issue) to be disabled. &lt;br /&gt;&lt;br /&gt;I'm not sure if the Alarm Clock was the problem, but it seems a coincidence that this happened after the very first time I had set an alarm on the phone.&lt;br /&gt;&lt;br /&gt;Anyway, I found that not only did this simple fix solve my issue and thus prevent me from having to send the phone back, but the Desire HD started working at lightning speed after this!&lt;br /&gt;&lt;br /&gt;Result!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6049053210656964021?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6049053210656964021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6049053210656964021&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6049053210656964021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6049053210656964021'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/01/htc-desire-hd-turns-itself-off-solved.html' title='HTC Desire HD turns itself off: Solved!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/TULH1C2T8qI/AAAAAAAAAIY/-a7psU4yf5c/s72-c/htcdesire.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2539027035377291045</id><published>2011-01-07T11:02:00.003Z</published><updated>2011-01-07T11:08:25.066Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssis'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server integration services'/><title type='text'>SSIS: Mapping parameter inside of a Execute SQL Task, OLE DB Source Component or Datareader component</title><content type='html'>In trying to use SSIS for some ETL, I wanted to be able to pass variables about in my packages to use in updating the status of tasks in a SQL Server database. &lt;br /&gt;&lt;br /&gt;I got my package to set a variable to the result passed OUT of a stored procedure, but I could not get it to work when trying to pass variables IN to a stored procedure. I kept getting errors such as "The query failed to parse. Syntax error, permission violation, or other nonspecific error". &lt;br /&gt;&lt;br /&gt;I spent hours trying to get it to work.&lt;br /&gt;&lt;br /&gt;It would not work.&lt;br /&gt;&lt;br /&gt;It drove me nuts. &lt;br /&gt;&lt;br /&gt;Then I found this &lt;a href="http://www.rafael-salas.com/2007/11/ssis-mapping-parameter-inside-of.html" target="_blank"&gt;post on Rafael Salas' blog&lt;/a&gt; which, ten minutes after reading, led me to the answer to my problem and a working DTSX package.&lt;br /&gt;&lt;br /&gt;Basically all that's involved is creating another package variable to contain the SQL you want to use, then evaluating it as an expression which allows you to use your other variables in the SQL and to execute the stored procedure as desired.&lt;br /&gt;&lt;br /&gt;There's nothing quite like seeing those DTSX package tasks lighting up green as it runs successfully!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2539027035377291045?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2539027035377291045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2539027035377291045&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2539027035377291045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2539027035377291045'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/01/ssis-mapping-parameter-inside-of.html' title='SSIS: Mapping parameter inside of a Execute SQL Task, OLE DB Source Component or Datareader component'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3756118312892731205</id><published>2011-01-06T15:25:00.004Z</published><updated>2011-01-06T15:34:48.591Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssis'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server integration services'/><title type='text'>SQL Server Business Intelligence Development Studio 2005: Variables Window Invisible</title><content type='html'>When trying to create a DTSX package in SQL Server Business Intelligence Development Studio 2005, I was looking to add a variable to assign to the result of a stored procedure. &lt;br /&gt;&lt;br /&gt;When I clicked the SSIS menu option and chose Variables or right clicked on the DTSX designer surface and chose the same option, nothing at all happened. It quickly drove me nuts and no matter what I did, I could not get the damned Variables window to appear!&lt;br /&gt;&lt;br /&gt;Then finally I opened the Window menu and clicked Auto Hide All. When I did this, the Variables window appeared next to the Toolbox and stayed visible when I reopened my project! &lt;br /&gt;&lt;br /&gt;Who knows why this happened, but if you happen to be struggling with this obscure issue then hopefully this solution will work for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3756118312892731205?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3756118312892731205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3756118312892731205&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3756118312892731205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3756118312892731205'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2011/01/sql-server-business-intelligence.html' title='SQL Server Business Intelligence Development Studio 2005: Variables Window Invisible'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7565549759080339654</id><published>2010-12-18T18:58:00.010Z</published><updated>2010-12-18T19:13:25.848Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='d-link dns-320'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='tech review'/><title type='text'>D-Link ShareCenter Pulse and Microsoft Sync Toy: Automatically sync files and folders in Windows</title><content type='html'>Since I had no decent way of backing up my files and photos other than using an Internet based service, I recently bought a NAS box, namely the &lt;a href="http://www.dlink.co.uk/cs/Satellite?c=Product_C&amp;childpagename=DLinkEurope-GB/DLProductCarouselMultiple&amp;cid=1197388178398&amp;p=1197318962342&amp;packedargs=locale%3D1195806691854&amp;pagename=DLinkEurope-GB/DLWrapper" target="_blank"&gt;D-Link ShareCenter Pulse DNS-320&lt;/a&gt; for £69.99 from &lt;a href="http://www.amazon.co.uk/D-LINK-ShareCenter-Pulse-DNS-320-included/dp/B004DIGJPA" target="_blank"&gt;Amazon&lt;/a&gt; (the price seems to have gone up since I bought it). See this &lt;a href="http://www.lovingadgets.com/d-link-sharecenter-pulse-2-bay-consumer-nas-suggested-201012/" target="_blank"&gt;review&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NfRmgpXyffo/TQ0HfsWe6qI/AAAAAAAAAIM/STvWgJzgyRE/s1600/dns320.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 186px; height: 271px;" src="http://4.bp.blogspot.com/_NfRmgpXyffo/TQ0HfsWe6qI/AAAAAAAAAIM/STvWgJzgyRE/s400/dns320.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5552102156680489634" /&gt;&lt;/a&gt;&lt;br /&gt;My first impressions after a few days are that it's a brilliant unit which comes with an iTunes server, uPnP server for streaming to PS3, Xbox 360 etc and also a built in BitTorrent client for downloading files without the need for a power hungry PC. &lt;br /&gt;&lt;br /&gt;It doesn't come with drives (which you'd expect at that price) so I put a 500GB SATA disk in which is more than enough for my needs just now. It's very quick to set up, and within an hour or so I had it ready to accept my files and it was streaming my iTunes and AV library on the LAN to the PC, PS3 and 360.&lt;br /&gt;&lt;br /&gt;But the problem I had was that I wanted to back up certain folders on my PC to the NAS without having to copy things manually. Ideally I wanted a utility that would monitor certain folders and if their contents changed, the changes would be mirrored between my PC and the NAS box. After some Googling around, I found a nice straightforward solution which does exactly what I needed: &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&amp;displaylang=en" target="_blank"&gt;Microsoft SyncToy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It's free, and is a very straightforward utility that you can use to sync folders automatically. You just pick the folders you want to sync, decide whether changes should be reflected on both devices or just one way, and off you go. It will mirror the two folders and any changes you make to one will be reflected in the other.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NfRmgpXyffo/TQ0GRa45dOI/AAAAAAAAAIE/0_xwyaQs1Lo/s1600/synctoy-01.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 326px;" src="http://2.bp.blogspot.com/_NfRmgpXyffo/TQ0GRa45dOI/AAAAAAAAAIE/0_xwyaQs1Lo/s400/synctoy-01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5552100811963200738" /&gt;&lt;/a&gt;&lt;br /&gt;So now if I copy photographs onto my PC, as long as the NAS box is up and running the pictures will be mirrored to the folder on the NAS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7565549759080339654?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7565549759080339654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7565549759080339654&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7565549759080339654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7565549759080339654'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/12/d-link-sharecenter-pulse-and-microsoft.html' title='D-Link ShareCenter Pulse and Microsoft Sync Toy: Automatically sync files and folders in Windows'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/TQ0HfsWe6qI/AAAAAAAAAIM/STvWgJzgyRE/s72-c/dns320.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7474057154407678666</id><published>2010-09-29T14:41:00.013+01:00</published><updated>2010-09-29T14:55:43.500+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='after the deadline'/><category scheme='http://www.blogger.com/atom/ns#' term='atd'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='spelling check'/><category scheme='http://www.blogger.com/atom/ns#' term='tech review'/><title type='text'>ASP.NET: Web Application Spell Checking with jQuery and AtD (After the Deadline)</title><content type='html'>&lt;strong&gt;Why did I need it?&lt;/strong&gt;&lt;br /&gt;In a recent project, we had a very large form with wizard steps and several multiline text area controls. The form was submitted to senior managers, so the requirement was raised to provide some kind of automated spell checking functionality. &lt;br /&gt;&lt;br /&gt;Given that this is a web application, it wasn't obvious which solution to choose. You can ask you users to install browser plugins which will check spelling, but this isn't really pratical since very few people would actually do it. Or you can install a full third party application on your server and use some kind of AJAX call to check spelling.&lt;br /&gt;&lt;br /&gt;If a spell checker does not make good suggestions to fix spelling or grammar mistakes, then it becomes pointless. So we needed something with a good comprehensive dictionary and it had to be quick.&lt;br /&gt;&lt;br /&gt;After some rooting around and consideration of third party products and also possibly somehow piggybacking on SharePoint's spell checking service, I found a product called &lt;a href="http://afterthedeadline.com" target="_blank"&gt;AtD (After the Deadline)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is AtD?&lt;/strong&gt;&lt;br /&gt;AtD is an open source solution which you can plug into your website using the wonderful jQuery (though it also offers other spell checking methods). It seems like an odd name to me, but apparently AtD is named after a similarly titled blog in the New York Times.&lt;br /&gt;&lt;br /&gt;It's a fantastic product and only takes a short time to set up. Using the jQuery version which I chose, it runs client side and will highlight spelling and grammar errors, and provide a good set of suggestions to fix them. It's quick, user friendly and it even works in IE6. Use &lt;a href="http://afterthedeadline.com/download.slp?platform=jQuery" target="_blank"&gt;this link&lt;/a&gt; to download the source code and view a couple of tutorials, though the tutorial I found most valuable was this one:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.polishmywriting.com/atd-jquery/demo3.html" target="_blank"&gt;Demo 3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is Demo 3 in action:&lt;/strong&gt;&lt;br /&gt;&lt;iframe src="http://www.polishmywriting.com/atd-jquery/demo3.html" width="100%" height="320" frameborder="0"&gt;&lt;br /&gt;  &lt;p&gt;Your browser does not support iframes.&lt;/p&gt;&lt;br /&gt;&lt;/iframe&gt;&lt;br /&gt;You can use that page to try out AtD for yourself, and if you view its source you can follow the simple step by step instructions to get started. &lt;br /&gt;&lt;br /&gt;There are tutorials on the site, but basically you either link to the source code and css, or embed it in your project, use a little bit of jQuery code to assign the spell checker to each textarea on your page, do any layout customisations you need and wham bam - it works. You don't need to add any markup to your existing page, the jQuery will do the legwork for you.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;It wasn't all plain sailing…&lt;/strong&gt;&lt;br /&gt;I did have a small problem in getting up and running with AtD. What's the problem I most often come up against in web development? That's right, Internet Explorer.&lt;br /&gt;&lt;br /&gt;Basically the issue was in getting the spell checker buttons to float to the right hand side of the textarea controls (to me, this seems the most obvious place to put them), but by default AtD will add the spell checker button to the top right hand side of the textarea using a dynamically rendered span element. &lt;br /&gt;&lt;br /&gt;I thought it'd be easy to get the spell checker button to sit where I needed it simply by modifying the css to make the spelling button float to the right of the textbox. This worked perfectly in Firefox, but in IE when you float the button, the onclick behaviour inexplicably stops working, thus rendering the whole thing useless. That was no good. &lt;br /&gt;&lt;br /&gt;Of course, you can edit the css used to render the AtD elements. So I played around with it for a while and ended up changing the default CSS for the spelling buttons to look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: css"&gt;&lt;br /&gt;.AtD_proofread_button &lt;br /&gt;{&lt;br /&gt;   width: 14px;&lt;br /&gt;   height: 14px;&lt;br /&gt;   background-image: url('../images/writing.gif');&lt;br /&gt;   margin-left: 465px;&lt;br /&gt;   position: absolute;&lt;br /&gt;}&lt;br /&gt;.AtD_edit_button &lt;br /&gt;{&lt;br /&gt;   width: 14px;&lt;br /&gt;   height: 14px;&lt;br /&gt;   background-image: url('../images/editing.gif');&lt;br /&gt;   margin-left: 465px;&lt;br /&gt;   position: absolute;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I removed the display:block property, added position: absolute and added a left margin which is roughly equivalent to the width of the textarea controls in my project. This meant that the buttons sat nicely alongside the textboxes, and the absence of a float property meant that IE and Firefox would render the whole thing nicely.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;After the Deadline makes for a superbly straightforward and lightweight spell checking solution for web applications which adds real value. I'll certainly be using this in any future web project where spell checking is required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7474057154407678666?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7474057154407678666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7474057154407678666&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7474057154407678666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7474057154407678666'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/09/aspnet-web-application-spell-checking.html' title='ASP.NET: Web Application Spell Checking with jQuery and AtD (After the Deadline)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4982512171227316736</id><published>2010-09-24T15:24:00.003+01:00</published><updated>2010-09-24T15:30:57.452+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='regular expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>ASP.NET: Limiting the length of a multiline textbox</title><content type='html'>ASP.NET comes with a lot of nice validator controls which save you the hassle of writing a lot of JavaScript components yourself.&lt;br /&gt;&lt;br /&gt;The TextBox control has a MaxLength property which allows you to easily restrict the length of the input. But bizarrely, a TextBox with its TextMode property set to MultiLine does not have this property. &lt;br /&gt;&lt;br /&gt;But of course, you still need a way to limit the amount of text input or your database operations could fail.&lt;br /&gt;&lt;br /&gt;Previously, I was using a JavaScript function attached to these textboxes with a function which was fired on keyup or lost focus which counted the number of characters and prevented overflow of a maximum set amount. &lt;br /&gt;&lt;br /&gt;That's the long way of doing it though: you can achieve the same validation using a RegularExpressionValidator, as highlighted on &lt;a href="http://weblogs.asp.net/rajbk/archive/2007/08/02/limiting-the-length-of-a-multiline-textbox.aspx" target="_blank"&gt;this post by Raj Kaimal&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Fundamentally, you create a RegularExpressionValidator control, point it at your multiline textbox and set this as the RegEx (300 in this example obviously being the maximum number of characters allowed):&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;^[\s\S]{0,300}$&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Et Voila! A simple and elegant solution - and no custom JavaScript required!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4982512171227316736?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4982512171227316736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4982512171227316736&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4982512171227316736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4982512171227316736'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/09/aspnet-limiting-length-of-multiline.html' title='ASP.NET: Limiting the length of a multiline textbox'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7047593813754879509</id><published>2010-09-16T14:35:00.005+01:00</published><updated>2010-09-16T14:51:41.396+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='typed dataset'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET: InvalidCastException from Strongly-Typed DataSet (XSD)</title><content type='html'>This one has had me tearing my hair out for months. &lt;br /&gt;&lt;br /&gt;In most of my ASP.NET projects I would have an XSD DataSet which models my database schema and acts as the data access layer for the application. But in several situations I would get unbelievably annoying exceptions from the designer file whenever my code attempted to get a boolean or date value from the database which was null. You would receive an exception like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;StrongTypingException was unhandled by user code.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The value for column 'abcdefgh' in table 'tblAbcdef' is null.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;My first step was to open the Properties of the column in the XSD designer and make sure that the AllowDbNull property is set to true. Then in the NullValue property I tried to change the behaviour from (Throw exception) to (Empty) or (Nothing). But Visual Studio blew up in my face and informed me that my selection was invalid.&lt;br /&gt;&lt;br /&gt;'Fine' I thought, 'I'll just check the value for DbNull before trying to set it in my code'. But when I tried to do such an IF statement, the StrongTypingException would still occur because before my expression tried to evaluate the column value, the designer would throw the StrongTypingException, thus never allowing the evaluation to take place.&lt;br /&gt;&lt;br /&gt;I couldn't find the answer to this, until a much smarter colleague pointed out the extremely simple answer. The designer file catches a InvalidCastException and then throws a StrongTypingException. So in my own code, I just need to catch the StrongTypingException and ignore it - assuming that ignoring it is the correct thing to do in that piece of code. I had been trying to catch the InvalidCastException which of course is incorrect because the designer had replaced that with the other exception type.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;    Try&lt;br /&gt;        .ClientContact = dbRecord.ClientIsStudent&lt;br /&gt;    Catch ex As Global.System.Data.StrongTypingException&lt;br /&gt;        ' Ignore since these are generated from the typed DataSet designer&lt;br /&gt;    End Try&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This worked and I am delighted to finally have the answer to this problem which has been bugging me for ages! &lt;br /&gt;&lt;br /&gt;If I had actually &lt;em&gt;read&lt;/em&gt; the designer file code I might have spotted that it throws a different type of exception to the one I was trying to catch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7047593813754879509?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7047593813754879509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7047593813754879509&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7047593813754879509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7047593813754879509'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/09/aspnet-invalidcastexception-from.html' title='ASP.NET: InvalidCastException from Strongly-Typed DataSet (XSD)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7333600481112391147</id><published>2010-09-03T11:03:00.005+01:00</published><updated>2010-09-03T11:11:23.509+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>ASP.NET: Failed to access IIS metabase (IIS)</title><content type='html'>When installing everything on my new machine, came across a problem in IIS when publishing my projects there. I got the error:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Failed to access IIS metabase&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Description:&lt;/strong&gt; An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code&lt;br /&gt;&lt;br /&gt;The error directs you to a &lt;a href="http://support.microsoft.com/?kbid=267904" target="_blank"&gt;Microsoft KB&lt;/a&gt; which isn't particularly helpful.&lt;br /&gt;&lt;br /&gt;I had seen this error before when using SQL Server Reporting Services but the &lt;a href="http://atominnovation.blogspot.com/2009/06/sql-server-reporting-services-and-iis.html" target="_blank"&gt;method I used last time&lt;/a&gt; works for SSRS, but not in this case. After a bit of Googling I found that this is a problem with the account permissions that ASP.NET runs under in IIS, as well as a method to solve it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.&lt;/strong&gt; Gave permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET".&lt;br /&gt;&lt;strong&gt;2.&lt;/strong&gt; Reset IIS (iisreset on command line) and that resolved the issue for ASP.NET 2.0.&lt;br /&gt;&lt;strong&gt;3.&lt;/strong&gt; We registered ASP.NET 1.1 with IIS as well using command "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis –i".&lt;br /&gt;&lt;strong&gt;4.&lt;/strong&gt; Reset IIS again.&lt;br /&gt;&lt;br /&gt;That did the job for me. Some other people had to go to greater lengths such as uninstalling .NET and reinstalling it, but the above steps resolved the problem in my case.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7333600481112391147?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7333600481112391147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7333600481112391147&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7333600481112391147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7333600481112391147'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/09/aspnet-failed-to-access-iis-metabase.html' title='ASP.NET: Failed to access IIS metabase (IIS)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1448598858389091061</id><published>2010-08-31T15:20:00.008+01:00</published><updated>2011-02-15T11:36:56.015Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenovo W510'/><category scheme='http://www.blogger.com/atom/ns#' term='tech review'/><title type='text'>Solved: Lenovo ThinkPad W510: High pitched squealing noise</title><content type='html'>I recently got a Lenovo ThinkPad W510 laptop, which is a bit of a beast (&lt;a href="http://www.pcadvisor.co.uk/reviews/index.cfm?reviewid=3223373" target="_blank"&gt;PC Advisor Review&lt;/a&gt;). There's an Intel Core i7 CPU running at 1.73 GHz, 3GB RAM and a nice 15.6" LED Screen. It's very well put together and feels like it will last for a long time, especially with the hard disk shock detection technology which turns off your hard drive if the chassis detects that the machine is dropped onto the ground&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_NfRmgpXyffo/TH0SlGwWdCI/AAAAAAAAAH0/t_CrqDMfGzA/s1600/lenovo.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 220px; height: 220px;" src="http://2.bp.blogspot.com/_NfRmgpXyffo/TH0SlGwWdCI/AAAAAAAAAH0/t_CrqDMfGzA/s400/lenovo.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5511581947649225762" /&gt;&lt;/a&gt;&lt;br /&gt;However, I had an issue with the laptop where it would make a constant high pitched squealing noise, almost so high pitched that only dogs would hear it, but unfortunately not quite.&lt;br /&gt;&lt;br /&gt;I thought I could live with it but when you're sitting next to it for 7-8 hours a day and the sound is drilling into your mind, it becomes quite annoying. But fortunately, unlike many others who had the same problem, the answer proved to be achievable without making any support phone calls or having any parts replaced. &lt;br /&gt;&lt;br /&gt;There's a very comprehensive suite of Lenovo settings which are preinstalled on the machine, and in particular there's an application called Power Manager. &lt;br /&gt;&lt;br /&gt;Since it's a high performance machine designed for development or graphics editing and therefore has heavy battery usage by default, it gives you fine grained control over the balance between performance and power. You can slow down the CPU, dull the screen and switch off optical drives if you're running on battery power, and when you're on AC you can disable all that and let it run at full tilt. &lt;br /&gt;&lt;br /&gt;These types of controls are nothing new, but in there was the answer to my squealing problem.&lt;br /&gt;&lt;br /&gt;As part of Power Manager, there's a setting called 'Deep Sleep' which is some kind of CPU power management function. This was the cause. So I created a new 'power management profile' within the Power Manager applet and set Deep Sleep to off, then saved it.&lt;br /&gt;&lt;br /&gt;After activating my new profile, the noise immediately went away! Thank goodness for that, because I had to get rid of the noise one way or another before it drove me nuts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1448598858389091061?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1448598858389091061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1448598858389091061&amp;isPopup=true' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1448598858389091061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1448598858389091061'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/08/lenovo-w510-high-pitched-squealing.html' title='Solved: Lenovo ThinkPad W510: High pitched squealing noise'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NfRmgpXyffo/TH0SlGwWdCI/AAAAAAAAAH0/t_CrqDMfGzA/s72-c/lenovo.jpg' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4037224690619096200</id><published>2010-08-30T14:35:00.007+01:00</published><updated>2010-08-30T14:55:06.931+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='css3'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Rounded Corners</title><content type='html'>I was asked to put some content inside a box shaped element which had rounded corners. Not square corners, it &lt;span style="font-weight:bold;"&gt;had &lt;/span&gt;to have rounded corners.&lt;br /&gt;&lt;br /&gt;Unfortunately, since HTML is so 'boxy' this behaviour does not come naturally. It's not just a setting on your table or div element, and there's no particularly easy way to achieve this effect.&lt;br /&gt;&lt;br /&gt;Until CSS3 and its &lt;span style="font-style:italic;"&gt;border-radius&lt;/span&gt; property comes into play in all of the next generation browsers, creating a screen element with rounded corners needs to be done another way. More info on border-radius and browser support is available on &lt;a href="http://www.css3.info/preview/rounded-border/" target="_blank"&gt;CSS3.info&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I found that the effect can be achieved using images and divs. There's a nice &lt;a href="http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners-borders.shtml" target="_blank"&gt;article on the Webcredible site&lt;/a&gt; which gives you a step by step tutorial on exactly how to do it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;N.B: &lt;/span&gt;&lt;span style="font-style:italic;"&gt;Being honest, you can actually use browser specific properties such as '-moz-border-radius' to display rounded corners, but I couldn't find the equivalent for IE which is no good since a large chunk of users will be using IE.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4037224690619096200?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4037224690619096200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4037224690619096200&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4037224690619096200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4037224690619096200'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/08/rounded-corners.html' title='Rounded Corners'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5315961963540715620</id><published>2010-08-23T12:10:00.009+01:00</published><updated>2010-08-23T12:23:25.572+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><title type='text'>ASP.NET Error: "The DataSource does not support sorting"</title><content type='html'>In one of our projects we had a GridView which was by default bound to an ObjectDataSource to allow us to Sort/Page and to apply custom filtering. But we also needed to be able to search the data which the GridView is bound to, which we achieved in code and then databound the GridView to the resulting DataTable. &lt;br /&gt;&lt;br /&gt;Here's a code snippet:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Before&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;        grdvSummaryGrid.DataSourceID = String.Empty&lt;br /&gt;&lt;br /&gt;        Dim _clientBLL As New ClientBLL()&lt;br /&gt;        grdvSummaryGrid.DataSource = _clientBLL .Search(e.SearchText)&lt;br /&gt;        grdvSummaryGrid.DataBind()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using this code, a problem arose where if you sorted the GridView and then carried out a search, an error resulted when the code attempted to DataBind it to the resulting table:&lt;br /&gt;&lt;br /&gt;"System.NotSupportedException: The data source does not support sorting"&lt;br /&gt;&lt;br /&gt;I tried a few things and considered creating an ObjectDataSource in code with the search results and then binding the GridView to that, but the answer turned out to be simple.&lt;br /&gt;&lt;br /&gt;Before setting the DataSourceID of the GridView to an empty string to allow you to set its DataSource to the resulting DataTable (you can't set both properties), you clear the sort expression. &lt;br /&gt;&lt;br /&gt;Like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;After (Notice the new first line)&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;        grdvSummaryGrid.Sort("", SortDirection.Ascending)&lt;br /&gt;        grdvSummaryGrid.DataSourceID = String.Empty&lt;br /&gt;&lt;br /&gt;        Dim _clientBLL As New ClientBLL()&lt;br /&gt;        grdvSummaryGrid.DataSource = _clientBLL .Search(e.SearchText)&lt;br /&gt;        grdvSummaryGrid.DataBind()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That did the job. Lots of people seem to have had this problem too, so hopefully this answer will be useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5315961963540715620?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5315961963540715620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5315961963540715620&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5315961963540715620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5315961963540715620'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/08/aspnet-error-datasource-does-not.html' title='ASP.NET Error: &quot;The DataSource does not support sorting&quot;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3780652405619073488</id><published>2010-08-21T14:21:00.003+01:00</published><updated>2010-08-25T10:49:43.889+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='datatable'/><title type='text'>ASP.NET: Sorting a DataTable</title><content type='html'>I was pulling out a DataTable from my database and applying some sorting to it in the Stored Procedure, which of course worked as expected.&lt;br /&gt;&lt;br /&gt;But I needed the user to be able to pull a row out from a GridView, edit its fields and then reinsert it to the GridView, all the time preserving the sort order.&lt;br /&gt;&lt;br /&gt;As usual, I went round the houses looking at all the usual crappy solutions that others who also forget to read the documentation come up with, until I found a simple solution that worked for me:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;     dataTable.DefaultView.Sort = "date_of_birth asc"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Simples! &lt;br /&gt;&lt;br /&gt;Here's the &lt;a href="http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&amp;l=EN-US&amp;k=k(SYSTEM.DATA.DATAVIEW.SORT);k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22);k(DevLang-VB)&amp;rd=true" target="_blank"&gt;MSDN documentation&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3780652405619073488?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3780652405619073488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3780652405619073488&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3780652405619073488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3780652405619073488'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/08/aspnet-sorting-datatable.html' title='ASP.NET: Sorting a DataTable'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3617133777314035745</id><published>2010-08-18T10:01:00.008+01:00</published><updated>2010-08-18T10:11:21.921+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS: RadioButtonList Layout</title><content type='html'>For the most part, I love web development, but there are some things that I absolutely detest about it.&lt;br /&gt;&lt;br /&gt;For example, something that should be straightforward such as getting horizontal radio buttons to appear in a neat and tidy way can be tough. Obviously your radiobutton labels will have different values and will therefore cause the list to have different widths - this can be messy if you have a few rows of radiobuttons. &lt;br /&gt;&lt;br /&gt;In addition, the radiobutton label will by default wrap down to underneath the radiobutton itself which is hideous. That needs to be fixed.&lt;br /&gt;&lt;br /&gt;You could try laying the controls out with a table or a series of fixed size divs, but you shouldn't need to. And using tables could be nasty.&lt;br /&gt;&lt;br /&gt;CSS to the rescue! Create a class to use for your RadioButton controls and assign it.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;.radioButtons {&lt;br /&gt;    border:none;&lt;br /&gt;    border-collapse:separate ;&lt;br /&gt;}&lt;br /&gt;.radioButtons input {&lt;br /&gt;    float:left;&lt;br /&gt;}&lt;br /&gt;.radioButtons label {&lt;br /&gt;    margin-left: 25px; &lt;br /&gt;    display: block; &lt;br /&gt;}&lt;br /&gt;.radioButtons td{&lt;br /&gt;    min-width:175px;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then just lay out your control like this (an ASP RadioButtonList control is used here but you could use HTML literals too I guess):&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;&amp;lt;asp:RadioButtonList ID=&amp;quot;rblYesNoMaybe&amp;quot; runat=&amp;quot;server&amp;quot; RepeatDirection=&amp;quot;Horizontal&amp;quot; &lt;br /&gt;CssClass=&amp;quot;radioButtons&amp;quot; &amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem&amp;gt;Yes&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem&amp;gt;No&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem&amp;gt;Maybe&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;&amp;lt;/asp:RadioButtonList&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using this, you should find that your RadioButtons look better and that your label text doesn't wrap underneath the radiobutton input. You'll probably need to set the min-width property of the td to an arbitrary value to suit your page or site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3617133777314035745?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3617133777314035745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3617133777314035745&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3617133777314035745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3617133777314035745'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/08/css-radiobuttonlist-layout.html' title='CSS: RadioButtonList Layout'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1691988260715745468</id><published>2010-06-26T13:46:00.003+01:00</published><updated>2010-06-26T13:58:30.287+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Inserting NULL Values Into SQL Server Database</title><content type='html'>I literally almost destroyed a laptop today when trying to get around the fact that empty dates in my application were being stored in SQL Server as the completely useless &lt;strong&gt;'1900-01-01 00:00:00.000'&lt;/strong&gt;. &lt;br /&gt;&lt;br /&gt;Note that SQL Server is not the issue here, it WILL insert a NULL value if it's told to. If you're seeing this 1900 date then it's coming from your application. &lt;br /&gt;&lt;br /&gt;I'm using an XSD within my Visual Studio project, and therefore it auto-generates methods for each of the methods I define on my TableAdapters. I needed to get null dates into these methods and then into the database without the application passing the 1900 date to SQL Server. &lt;br /&gt;&lt;br /&gt;I tried loads of different methods of checking the values, by trying to pass Nothing, SqlDateTime.Null or System.DBNull.Value where the date was empty, but to no avail, I either got cast errors or the database did the insert but continued to think we were at the dawn of the 20th century.&lt;br /&gt;&lt;br /&gt;Finally, I figured it out, and really there are two ways of achieving this. One is to use a Typed DataSet, which allows you to use the autogenerated 'SetMyColumnNameNull()' method.&lt;br /&gt;&lt;br /&gt;But I'm not using a typed DataSet for my database insert methods, rather I call the stored procedure methods in my BLL and pass in the values rather than a row object. &lt;br /&gt;&lt;br /&gt;So anyway, the answer was this:&lt;br /&gt;&lt;br /&gt;When passing your date to your method which calls your stored procedure, pass your dates as strings. Then in your code you can check them like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;&lt;br /&gt;    &lt;System.ComponentModel.DataObjectMethodAttribute _&lt;br /&gt;        (System.ComponentModel.DataObjectMethodType.Insert, True)&gt; _&lt;br /&gt;    Public Function InsertOrder(ByVal date_in_question as String)&lt;br /&gt;&lt;br /&gt;Dim dateInQuestion As Global.System.Nullable(Of Date)&lt;br /&gt;&lt;br /&gt;        ' Bust any empty dates&lt;br /&gt;        If date_in_question &lt;&gt; "" Then&lt;br /&gt;            dateInQuestion = CDate(date_in_question)&lt;br /&gt;        End If&lt;br /&gt;&lt;br /&gt;        ' Do the Insert&lt;br /&gt;        Dim orderId As Integer = Adapter.db_Insert_Update_Order(dateInQuestion)&lt;br /&gt;&lt;br /&gt;Return orderId&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now when the date is passed to the stored procedure's method, if no date is set then an empty date is passed and the database inserts a NULL value.&lt;br /&gt;&lt;br /&gt;You might want a more robust way of parsing your dates etc etc, but this worked for me. &lt;br /&gt;&lt;br /&gt;Hope I've provided enough detail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1691988260715745468?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1691988260715745468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1691988260715745468&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1691988260715745468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1691988260715745468'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-inserting-null-values-into-sql.html' title='ASP.NET: Inserting NULL Values Into SQL Server Database'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2851289526717402876</id><published>2010-06-21T15:56:00.006+01:00</published><updated>2010-06-21T16:04:19.801+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fileupload control'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET FileUpload Control Inside an UpdatePanel</title><content type='html'>I put a FileUpload control inside an UpdatePanel and ran into some problems, as many others did. &lt;br /&gt;&lt;br /&gt;Since the UpdatePanel does not do a full postback by nature (and therefore only partially refreshes the screen), the FileUpload control does not work straight away.&lt;br /&gt;&lt;br /&gt;To get it to work you need to add a PostBackTrigger which points at your Upload button. Here's a &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.postbacktrigger.aspx" target="_blank"&gt;Microsoft example&lt;/a&gt; on that very topic.&lt;br /&gt;&lt;br /&gt;Using a PostBackTrigger will cause a full postback to fire when a file is uploaded and will cause your control to work... in most cases.&lt;br /&gt;&lt;br /&gt;However I found an odd issue where the file upload did not work the first time (the FileUpload control's HasFile property was always False) but it would upload successfully the second time. &lt;br /&gt;&lt;br /&gt;I had to root around in a few places and eventually found the answer on &lt;a href="http://stackoverflow.com/questions/1699516/upload-fails-once-then-works-correctly" target="_blank"&gt;StackOverflow's forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Turns out the answer is to define this in your Page_Load event:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;br /&gt;&lt;br /&gt;Page.Form.Enctype = "multipart/form-data"&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After I added this, the FileUpload control started to work every time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2851289526717402876?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2851289526717402876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2851289526717402876&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2851289526717402876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2851289526717402876'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-fileupload-control-inside.html' title='ASP.NET FileUpload Control Inside an UpdatePanel'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6108666316409402547</id><published>2010-06-14T10:11:00.007+01:00</published><updated>2010-06-21T16:09:55.474+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Posting Code in Blog Posts'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax highlighter'/><title type='text'>Syntax Highlighter Success</title><content type='html'>Finally, I managed to get &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" target="_blank"&gt;SyntaxHighlighter&lt;/a&gt; working.&lt;br /&gt;&lt;br /&gt;I had tried a few things previously, but it seems that some of the tutorials I had seen were based on older versions. The joy arrived when I found &lt;a href="http://blog.cartercole.com/2009/10/awesome-syntax-highlighting-made-easy.html" target="_blank"&gt;this post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now I can post code snippets in a way which is actually readable!&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SELECT  &lt;br /&gt;    COUNT(dbid) as TotalConnections &lt;br /&gt;FROM &lt;br /&gt;    sys.sysprocesses &lt;br /&gt;WHERE  &lt;br /&gt;    dbid &gt; 0 &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hurrah! &lt;br /&gt;&lt;br /&gt;I'm still using &lt;a href="http://www.stanleyshilov.com/online-tools/convert-special-characters-into-html-entities/" target="_blank"&gt;Stanley Shilov's utility&lt;/a&gt; to escape my HTML so that I can post using these simple tags:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;&amp;lt;pre class=&amp;quot;brush: html&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6108666316409402547?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6108666316409402547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6108666316409402547&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6108666316409402547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6108666316409402547'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/syntax-higlighter-success.html' title='Syntax Highlighter Success'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7273151728196556557</id><published>2010-06-14T09:46:00.006+01:00</published><updated>2010-06-14T10:21:01.247+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><title type='text'>SQL Server 2005: Determining the Total Number of Open/Active Connections</title><content type='html'>Sometimes applications can become unresponsive or generate SQL Server timeout exceptions (System.Data.SQLClient.SQLException: Timeout Expired) and sometimes you just need to find out how much traffic is hitting your database. &lt;br /&gt;&lt;br /&gt;You can find out a few things by using these commands:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Total Number of Connections by Database&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SELECT  &lt;br /&gt;    DB_NAME(dbid) as DBName,  &lt;br /&gt;    COUNT(dbid) as NumberOfConnections, &lt;br /&gt;    loginame as LoginName &lt;br /&gt;FROM &lt;br /&gt;    sys.sysprocesses &lt;br /&gt;WHERE  &lt;br /&gt;    dbid &amp;gt; 0 &lt;br /&gt;GROUP BY  &lt;br /&gt;    dbid, loginame&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Total Connections&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SELECT  &lt;br /&gt;    COUNT(dbid) as TotalConnections &lt;br /&gt;FROM &lt;br /&gt;    sys.sysprocesses &lt;br /&gt;WHERE  &lt;br /&gt;    dbid &gt; 0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Detailed description of all running processes&lt;/strong&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;sp_who2 'Active'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;NB: You probably need to be logged in with SA privileges to run these commands.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7273151728196556557?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7273151728196556557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7273151728196556557&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7273151728196556557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7273151728196556557'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/sql-server-2005-determining-total.html' title='SQL Server 2005: Determining the Total Number of Open/Active Connections'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6008088438463114535</id><published>2010-06-09T23:13:00.004+01:00</published><updated>2010-06-09T23:17:35.629+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='listview'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: ListView Control and Nested ListViews</title><content type='html'>I have grown to love (in a purely sensible way) the ASP.NET ListView control. It's very flexible and gives you a lot of control over how you display your data on your site. &lt;br /&gt;&lt;br /&gt;I needed to display on a summary screen not only the orders belonging to a specific customer, but the products belonging to each order. So I built a ListView to display the orders, then nested another ListView inside it which displays the products belonging to that order.&lt;br /&gt;&lt;br /&gt;After some rooting around on the net, I found &lt;a href="http://leedumond.com/blog/nested-listviews-and-more-working-with-databound-controls-inside-the-listview/" target="_blank"&gt;this excellent tutorial&lt;/a&gt; for nesting ListViews that I'll definitely be revisiting in future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6008088438463114535?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6008088438463114535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6008088438463114535&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6008088438463114535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6008088438463114535'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-listview-control-and-nested.html' title='ASP.NET: ListView Control and Nested ListViews'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-8786120244939165219</id><published>2010-06-07T17:10:00.007+01:00</published><updated>2010-06-07T17:28:21.245+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#.net'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='datatable'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><title type='text'>ASP.NET: Select DISTINCT from DataTable</title><content type='html'>I needed to filter a GridView using a bunch of DropDownLists which were placed in its header. As you filter the GridView, the drop down lists had to update according to the filtered data in the GridView (i.e. they should not display filter options for data that's not visible in the table).&lt;br /&gt;&lt;br /&gt;In order for this to work, I had to get a distinct list of values for each column with which to populate the drop down lists. This required getting a distinct list of values from a DataTable, and this behaviour does not come naturally to a DataTable since it's a &lt;em&gt;representation&lt;/em&gt; of a SQL Database table rather than an &lt;em&gt;actual&lt;/em&gt; database table which you can run SQL against.&lt;br /&gt;&lt;br /&gt;I found a nice tutorial on this, which I'm linking to here for future reference, in both &lt;a href="http://support.microsoft.com/kb/325684" target="_blank"&gt;VB.NET&lt;/a&gt; and &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;326176#1" target="_blank"&gt;C#.NET&lt;/a&gt; versions.&lt;br /&gt;&lt;br /&gt;I had to pass the DataSource my GridView was pointing at into a method which bound the DropDownLists using the function demonstrated in Microsoft's tutorials above. &lt;br /&gt;&lt;br /&gt;Implemented, hooked into my GridView and Bob's My Uncle. &lt;br /&gt;&lt;br /&gt;Very nice!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-8786120244939165219?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/8786120244939165219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=8786120244939165219&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8786120244939165219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8786120244939165219'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-select-distinct-from-datatable.html' title='ASP.NET: Select DISTINCT from DataTable'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4556068121073772030</id><published>2010-06-04T21:20:00.007+01:00</published><updated>2010-06-14T10:22:43.961+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='repeater'/><title type='text'>ASP.NET: Handing an empty Repeater control</title><content type='html'>The ASP.NET Repeater control is very useful and gives you lots of control over your output when compared to other controls such as the GridView. However, that comes at a cost of having to wire up all of your own events, sorting and paging etc. &lt;br /&gt;&lt;br /&gt;Additionally, another drawback is that for a reason I can't explain, there is no EmptyDataTemplate or EmptyDataText property in a repeater which you can use when there are no items to display. Rumour abounded that ASP.NET 2.0 would include such a template, but it was not included. &lt;br /&gt;&lt;br /&gt;Several people have tried different methods of handling this situation, but I found one which I think works nicely. I have a user control with a repeater in it, and on the Page_PreRender event I check that the Repeater's DataSource has rows in it. If not, then a label is made visible that tells the user no rows are present. If it does have data, then the Repeater is displayed. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Label:&lt;/em&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;&amp;lt;asp:Label ID=&amp;quot;LabelNoProducts&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;You haven&amp;#039;t added any products yet&amp;quot; visible=&amp;quot;false&amp;quot; &amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;em&gt;Event: (User Control PreRender)&lt;/em&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;    Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender&lt;br /&gt;        Dim ds As DataTable = RepeaterProductsList.DataSource&lt;br /&gt;&lt;br /&gt;        If ds.Rows.Count = 0 Then&lt;br /&gt;            RepeaterProductsList.Visible = False&lt;br /&gt;            LabelNoProducts.Visible = True&lt;br /&gt;        Else&lt;br /&gt;            RepeaterProductsList.Visible = True&lt;br /&gt;            LabelNoProducts.Visible = False&lt;br /&gt;        End If&lt;br /&gt;    End Sub&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Et voila. Each time your user control is loaded, it checks if there are rows in the repeater, and lets the user know if not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4556068121073772030?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4556068121073772030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4556068121073772030&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4556068121073772030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4556068121073772030'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-handing-empty-repeater-control.html' title='ASP.NET: Handing an empty Repeater control'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-114701501194537542</id><published>2010-06-04T15:23:00.003+01:00</published><updated>2010-06-14T16:49:23.171+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Read Contents of Text File</title><content type='html'>In my Web Application Project, I wanted to read some CSS styles in from a file to dynamically style a system generated email.&lt;br /&gt;&lt;br /&gt;It was pretty easy, but I thought I should record my code for future:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;Dim emailCss As String = vbNullString&lt;br /&gt;&lt;br /&gt;        Dim fileName As String = HttpContext.Current.Server.MapPath(&amp;quot;~/utilities/Email.css&amp;quot;)&lt;br /&gt;&lt;br /&gt;        If File.Exists(fileName) Then&lt;br /&gt;            Dim ioFile As New StreamReader(fileName)&lt;br /&gt;&lt;br /&gt;            emailCss = ioFile.ReadToEnd()&lt;br /&gt;&lt;br /&gt;            ioFile.Close()&lt;br /&gt;&lt;br /&gt;        End If&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-114701501194537542?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/114701501194537542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=114701501194537542&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/114701501194537542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/114701501194537542'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-read-contents-of-text-file.html' title='ASP.NET: Read Contents of Text File'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6946571576164568246</id><published>2010-06-03T10:56:00.011+01:00</published><updated>2010-06-14T16:55:35.611+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Render Control into HTML String</title><content type='html'>Occasionally there is a need to get string representation of ASP.NET control in other words - render it into string instead of let it be rendered on the page. For example, you may want to grab the HTML rendering of an ASP.NET server control and attach it to an email.&lt;br /&gt;&lt;br /&gt;The following method renders control into HTML string. &lt;br /&gt;&lt;br /&gt;Namespaces used:&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Below is RenderControl method implementation, which receives any control and returns its HTML string representation.&lt;br /&gt;&lt;br /&gt;C#&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;br /&gt;public string RenderControl(Control ctrl) &lt;br /&gt;{&lt;br /&gt;    StringBuilder sb = new StringBuilder();&lt;br /&gt;    StringWriter tw = new StringWriter(sb);&lt;br /&gt;    HtmlTextWriter hw = new HtmlTextWriter(tw);&lt;br /&gt;&lt;br /&gt;    ctrl.RenderControl(hw);&lt;br /&gt;    return sb.ToString();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;VB.NET&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;Public Function RenderControl(ByVal ctrl As Control) As String&lt;br /&gt;        Dim sb As New StringBuilder()&lt;br /&gt;        Dim sw As New StringWriter(sb)&lt;br /&gt;        Dim htw As New HtmlTextWriter(sw)&lt;br /&gt;&lt;br /&gt;        ctrl.RenderControl(htw)&lt;br /&gt;&lt;br /&gt;        Return sb.ToString()&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are a few drawbacks to this approach, in that any LinkButtons or other controls which depend on being inside an HTML form will fail unless you include the form in the email body too.&lt;br /&gt;&lt;br /&gt;See these two (rather old) posts on 4GuysFromRolla.com by Scott Mitchell:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Part 1&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.4guysfromrolla.com/articles/091102-1.aspx"&gt;http://www.4guysfromrolla.com/articles/091102-1.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Part 2:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.4guysfromrolla.com/articles/102203-1.aspx"&gt;http://www.4guysfromrolla.com/articles/102203-1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6946571576164568246?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6946571576164568246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6946571576164568246&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6946571576164568246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6946571576164568246'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/06/aspnet-render-control-into-html-string.html' title='ASP.NET: Render Control into HTML String'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5574641970412965894</id><published>2010-04-30T12:50:00.004+01:00</published><updated>2010-04-30T12:55:50.573+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>VB.NET: Use a Ternary Operator to check variable before assignment</title><content type='html'>It's a nice thing to be able to quickly check a value before assigning it to a variable, perhaps in a situation where you want to avoid a NullReferenceException.&lt;br /&gt;&lt;br /&gt;If you want to do this, you can use a Ternary Operator which allows you to do the whole thing on one line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim s As String&lt;br /&gt;s = If(Session("mySessionVar") Is Nothing, String.Empty, Session("mySessionVar").ToString) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For more detail, refer to &lt;a href="http://blog.dmbcllc.com/2007/11/29/the-ternary-operator-in-vbnet" target="_blank"&gt;this blog post&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5574641970412965894?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5574641970412965894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5574641970412965894&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5574641970412965894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5574641970412965894'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/04/vbnet-use-ternary-operator-to-check.html' title='VB.NET: Use a Ternary Operator to check variable before assignment'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4064514891539985663</id><published>2010-04-12T16:48:00.008+01:00</published><updated>2010-06-25T12:18:32.764+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net ajax combo'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET: Reset Selected Value of AJAX Combo Box</title><content type='html'>I have been banging my head off my desk for hours and hours, trying to find a way to reset the value of an ASP.NET Control Toolkit Combo Box.&lt;br /&gt;&lt;br /&gt;Fundamentally it's a brilliant control and lends some superb ease of use to an application when applied properly, but for some reason it's lacking a straightforward and functional way to reset its value to a default of something like:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&amp;lt;asp:ListItem Value="0"&amp;gt; -- Select -- &amp;lt;/asp:ListItem&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I tried various combination of these, plus messing about with the AppendDataBoundItems property and the ViewState setting:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;ComboBoxSelector.SelectedIndex = -1&lt;br /&gt;ComboBoxSelector.SelectedIndex = 0&lt;br /&gt;ComboBoxSelector.SelectedIndex.ClearSelection()&lt;br /&gt;ComboBoxSelector.SelectedIndex.Dispose()&lt;br /&gt;ComboBoxSelector.Items.Clear()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Those are not important, the thing to note is that using any of the above will not actually reset the value of the Combo Box.&lt;br /&gt;&lt;br /&gt;To reset it, you have to loop through the hidden controls that are created at runtime, and reset those to the default value:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: vb"&gt;&lt;br /&gt;Dim ctl As Control&lt;br /&gt;For Each ctl In ComboBoxAllKeywordCategories.Controls&lt;br /&gt;If TypeOf ctl Is HiddenField Then&lt;br /&gt;CType(ctl, HiddenField).Value = "0"&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This works, and resets the Combo back to the default value you want. I no longer feel the need to put my fist through my monitor, so, result.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4064514891539985663?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4064514891539985663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4064514891539985663&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4064514891539985663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4064514891539985663'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/04/aspnet-reset-selected-value-of-ajax.html' title='ASP.NET: Reset Selected Value of AJAX Combo Box'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1412587460533745735</id><published>2010-04-09T10:51:00.008+01:00</published><updated>2010-04-09T11:04:22.041+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><title type='text'>ASP.NET: How to Group Data in the GridView Control</title><content type='html'>One of my clients was not happy with a GridView control that repeated a category name next to every product inside that category. He asked if we could group the table to display the category name only once rather than displaying it for every product, e.g. something like:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_LQ-3m4uF-VU/SJbxwyYc4hI/AAAAAAAABLE/j5S3I3hkEng/s320/ZNet+Gridview.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 265px; CURSOR: hand" border="0" alt="" src="http://4.bp.blogspot.com/_LQ-3m4uF-VU/SJbxwyYc4hI/AAAAAAAABLE/j5S3I3hkEng/s320/ZNet+Gridview.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;'Crap', I thought. 'This doesn't come easily to the GridView control.'&lt;br /&gt;&lt;br /&gt;But after some research into &lt;a href="http://couldbedone.blogspot.com/2007/06/gridview-very-simple-grouping.html" target="_blank"&gt;several&lt;/a&gt; &lt;a href="http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm" target="_blank"&gt;different&lt;/a&gt; &lt;a href="http://aspalliance.com/1268_CodeSnip_How_to_Group_Data_in_the_GridView_Control.all" target="_blank"&gt;methods&lt;/a&gt;, I found a good one that worked well for me. It was created by a developer called 'dotNetSoldier', and the control is called the ZNet Extended GridView.&lt;br /&gt;&lt;br /&gt;You just &lt;a href="http://code.msdn.microsoft.com/ZNetControls" target="_blank"&gt;download the DLL file&lt;/a&gt; and drop it into your bin folder, add the control to your Toolbox and drag it onto your page. Then follow the &lt;a href="http://znetcontrols.blogspot.com/2008/08/extended-gridview-for-aspnet-20-with.html" target="_blank"&gt;instructions on his blog&lt;/a&gt; to get started.&lt;br /&gt;&lt;br /&gt;I'd rather not have had to add another reference in my project or use a third party control, but I couldn't get the traditional GridView to behave in this way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1412587460533745735?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1412587460533745735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1412587460533745735&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1412587460533745735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1412587460533745735'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/04/aspnet-how-to-group-data-in-gridview.html' title='ASP.NET: How to Group Data in the GridView Control'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_LQ-3m4uF-VU/SJbxwyYc4hI/AAAAAAAABLE/j5S3I3hkEng/s72-c/ZNet+Gridview.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2401810108122447967</id><published>2010-03-22T09:55:00.005Z</published><updated>2010-03-22T10:13:24.589Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>SQL Server: Deleting duplicates using a Common Table Expression (CTE)</title><content type='html'>In a recent project I had to figure out how to delete a series of duplicates from a tablet to prevent a report becoming bloated with them.&lt;br /&gt;&lt;br /&gt;There's more than one way to skin a cat, but I think I have found a pretty efficient way of deleting dupes. Of course it would be preferable to avoid creating the duplicate rows in the first place, but sometimes you just have to delete them after they have been created.&lt;br /&gt;&lt;br /&gt;A recent development in the SQL Server world is that of &lt;a href="http://msdn.microsoft.com/en-us/library/ms190766.aspx" target="_blank"&gt;Common Table Expressions&lt;/a&gt; (CTEs). These can be used to help you delete duplicates using a single command, rather than using a temporary table or too many joins.&lt;br /&gt;&lt;br /&gt;The CTE is formed by selecting the table into a temporary result set which you can then instantly relate back to the original table to find which rows to delete. You could use syntax similar to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;WITH Duplicates_CTE&lt;br /&gt;(FirstName, LastName, Email, Phone, id)&lt;br /&gt;AS (&lt;br /&gt;SELECT FirstName, LastName, Email, Phone, MIN(PersonId) id&lt;br /&gt;FROM tblPerson GROUP BY FirstName, LastName, Email, Phone&lt;br /&gt;)&lt;br /&gt;DELETE FROM tblPerson WHERE PersonId NOT IN (&lt;br /&gt;SELECT id FROM Duplicates_CTE&lt;br /&gt;) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first select statement gets a distinct result set (without duplicate rows) from the problem table by using the MIN function and a GROUP BY clause. Then you can join back to the original table from the CTE result set and delete every row that does not correlate to the CTE - which means that you're left without any duplicate rows.&lt;br /&gt;&lt;br /&gt;Et voila, simples! No duplicates and it's all done in one command.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2401810108122447967?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2401810108122447967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2401810108122447967&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2401810108122447967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2401810108122447967'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/03/sql-server-deleting-duplicates-using.html' title='SQL Server: Deleting duplicates using a Common Table Expression (CTE)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5652443739702594330</id><published>2010-03-16T20:55:00.003Z</published><updated>2010-03-16T21:07:06.344Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='code behind'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET Code Behind Intellisense Not Working</title><content type='html'>This has been infuriating.&lt;br /&gt;&lt;br /&gt;So many times when developing web applications using Visual Studio 2008 Enterprise Edition or Visual Studio Web Developer Express 2008, the intellisense in the code behind would stop working, and when the project is deployed any reference to page controls would result in a null reference exception.&lt;br /&gt;&lt;br /&gt;There are quite a few things to try:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Close Visual Studio (Or VSWDE) and delete the intellisense files which are normally stored in your Windows profile.&lt;/li&gt;&lt;li&gt;Open the IDE again and rebuild the project.&lt;/li&gt;&lt;li&gt;Check that your aspx page is properly wired up to your code behind in the page directive.&lt;/li&gt;&lt;li&gt;Delete the project dll file in the bin folder and rebuild your project.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;This is the one that worked for me: &lt;/strong&gt;Check that there is a designer file associated with that page. If there is not, then in Visual Studio, right click on the project in Solution Explorer and click Convert to Web Application. That should regenerate the designer file for you.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If your intellisense isn't working and your code behind just can't seem to reference the controls, there are a lot of things that could be wrong. But if you try all of those, then hopefully you'll be back coding again instead of angrily trying to figure out what's wrong. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5652443739702594330?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5652443739702594330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5652443739702594330&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5652443739702594330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5652443739702594330'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/03/aspnet-code-behind-intellisense-not.html' title='ASP.NET Code Behind Intellisense Not Working'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4093302184070007334</id><published>2010-03-05T10:57:00.003Z</published><updated>2010-03-05T11:00:34.489Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Styling GridView Controls with CSS</title><content type='html'>Doing a lot of ASP.NET development usually means that GridView controls will be a regular feature in your applications, unless you prefer to go for the manual approach or use a repeater.&lt;br /&gt;&lt;br /&gt;One of the biggest pains I've had in the past with GridViews is styling them consistently. But it wasn't enough of a pain to motivate me to spend the time styling them with CSS, until I started an entirely new application which would feature dozens of them. &lt;br /&gt;&lt;br /&gt;So I located &lt;a href="http://atashbahar.com/post/GridView-makeover-using-CSS.aspx" target="_blank"&gt;this tutorial&lt;/a&gt; which was absolutely perfect - just what I was looking for. It has a screen shot of the end result, good instructions and easily duplicated code and CSS that will get you on your way to having a consistent look and feel for all your GridView controls throughout your application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4093302184070007334?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4093302184070007334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4093302184070007334&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4093302184070007334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4093302184070007334'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/03/styling-gridview-controls-with-css.html' title='Styling GridView Controls with CSS'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1105135503440176741</id><published>2010-03-02T11:27:00.005Z</published><updated>2010-03-02T11:32:38.569Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ie8'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='ie6'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS min-height and IE6</title><content type='html'>I've been working on a new application which has to be fully compatible with IE6 and IE8. Being quite a fan of using min-height to avoid nasty squished pages, I noticed that the min-height CSS property is rendered properly in IE8, but NOT in IE6 (shock).&lt;br /&gt;&lt;br /&gt;A nice, easy workaround &lt;a href="http://www.dustindiaz.com/min-height-fast-hack/" target="_blank"&gt;I found&lt;/a&gt; is this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;content {&lt;br /&gt;    min-height: 630px;&lt;br /&gt;    height: auto !important;&lt;br /&gt;    height: 630px;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This works in IE6, without messing up the formatting in IE8 and other browsers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1105135503440176741?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1105135503440176741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1105135503440176741&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1105135503440176741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1105135503440176741'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/03/css-min-height-and-ie6.html' title='CSS min-height and IE6'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1923209764867268262</id><published>2010-01-27T21:46:00.005Z</published><updated>2010-01-27T22:02:39.276Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server error'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>SQL Server 2008 Express Edition: Installing on a Domain Controller</title><content type='html'>If you try to install SQL Server 2008 Express Edition on a machine which acts as a Domain Controller using the packaged Web Platform installer, it will fail and you will see an error in the installation log.&lt;br /&gt;&lt;br /&gt;This is because it will attempt to install using Network Service as the default account, which is not allowed on a domain controller. If you look in the logs, you will see an error such as:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;Network Service or Local Service account is not permitted for the SQL Server service on a domain controller&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you experience this issue, you need to do a customised installation. This &lt;a href="http://blogs.msdn.com/sqlexpress/archive/2009/06/15/installing-sql-server-2008-guidance.aspx" target="_blank"&gt;blog post&lt;/a&gt; highlights the issues involved and has links to the appropriate installlers to get you up and running.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms143506.aspx#DC_Support" target="_blank"&gt;Microsoft do not recommend installing SQL Server on a Domain Controller&lt;/a&gt;, so you need to think about your performance requirements and the potential issues such an installation may cause.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1923209764867268262?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1923209764867268262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1923209764867268262&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1923209764867268262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1923209764867268262'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/01/sql-server-2008-express-edition.html' title='SQL Server 2008 Express Edition: Installing on a Domain Controller'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1394781137274483365</id><published>2010-01-27T09:57:00.003Z</published><updated>2010-01-27T10:05:46.551Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='web.config'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='error handling'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='.net framework'/><title type='text'>ASP.NET Error: System.Web.HttpException: Maximum request length exceeded</title><content type='html'>On several applications I have developed, the users need to be able to upload binary documents (discussed in other posts).&lt;br /&gt;&lt;br /&gt;After a while, I kept getting the error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#ff0000;"&gt;System.Web.HttpException: Maximum request length exceeded&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Easy fix. The problem is that by default, the maximum request size is 4mb. So when a user tries to upload a file which is larger than that, an exception occurs. The resolution is to increase the maximum size of the request, so add the attribute below to web.config (you can use a maxRequestLength up to "2097151" (2 GB) for the .NET Framework 2.0):&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;color:#000000;"&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;lt;httpruntime maxrequestlength="10240"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;This is also explained quite nicely but without much background in a &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626" target="_blank"&gt;Knowledge Base article&lt;/a&gt; on the Microsoft Support site.&lt;br /&gt;&lt;br /&gt;Remember, if you are imposing a maximum file size for upload you should notify the user of this restriction and handle any attempt to upload a larger file, or they might see errors again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1394781137274483365?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1394781137274483365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1394781137274483365&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1394781137274483365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1394781137274483365'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/01/aspnet-error-systemwebhttpexception.html' title='ASP.NET Error: System.Web.HttpException: Maximum request length exceeded'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6467825169919977787</id><published>2010-01-19T16:32:00.003Z</published><updated>2010-01-19T16:40:30.127Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='web.config'/><category scheme='http://www.blogger.com/atom/ns#' term='postbacks'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='browsers'/><title type='text'>ASP.NET: Maintain Browser Scroll Position After Postback</title><content type='html'>In many applications, the screen can have many controls which cause postback events. And if the screen has any vertical scrollbars, users will typically object if the scroll position is not maintained (fair enough) and they have to scroll back down to find where they were and also to spot which changes the postback caused.&lt;br /&gt;&lt;br /&gt;I had been mucking about with JavaScript solutions to this, which actually did work. But the easiest way is to follow one of these methods:&lt;br /&gt;&lt;br /&gt;1. Set it programmatically&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Page.MaintainScrollPositionOnPostBack = &lt;span style="color:#3333ff;"&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. In the page declaration:&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ Page MaintainScrollPositionOnPostback=&amp;quot;true&amp;quot; %&amp;gt;&lt;br /&gt;&lt;br /&gt;3. Or as a global setting in the web.config file, modify the pages section to add the property:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;&lt;span style="color:#990000;"&gt;pages&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;maintainScrollPositionOnPostBack&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;="true" &gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6467825169919977787?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6467825169919977787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6467825169919977787&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6467825169919977787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6467825169919977787'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/01/aspnet-maintain-browser-scroll-position.html' title='ASP.NET: Maintain Browser Scroll Position After Postback'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3411099437031064130</id><published>2010-01-15T16:07:00.003Z</published><updated>2010-01-15T16:13:54.086Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='postbacks'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET Error: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control</title><content type='html'>If you are using controls which are bound in a cascading parent-child relationship, you might see the error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#ff0000;"&gt;Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I kept getting this, but then after reading &lt;a href="http://www.webswapp.com/codesamples/aspnet20/dependentlists/default.aspx" target="_blank"&gt;this tutorial&lt;/a&gt;, I realised that I had been sorting a GridView in my Page_Load event, regardless of whether the page request was a PostBack or not.&lt;br /&gt;&lt;br /&gt;This was causing the databinding events to get borked up, and hence the error. So I added a simple IF statement around the sorting command to only do so if the page request was not a postback. Et Voila! Success!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Lesson: &lt;/strong&gt;If you see the above error, check that you are not attempting to bind to a dependent dropdown list a value from its container’s data context when the latter was not bound to the container. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In English:&lt;/strong&gt; check where in the page lifecycle your binding/sorting takes place otherwise you will unhook your controls from their binding and break your code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3411099437031064130?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3411099437031064130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3411099437031064130&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3411099437031064130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3411099437031064130'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/01/aspnet-error-databinding-methods-such.html' title='ASP.NET Error: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4722589965894695448</id><published>2010-01-07T11:26:00.013Z</published><updated>2010-01-15T16:23:19.177Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><title type='text'>ASP.NET: Search GridView and Programatically Select Row</title><content type='html'>On the main page of one of my apps, I have a large GridView containing a lot of rows. They're paged, but the number of pages can run to ten or twenty.&lt;br /&gt;&lt;br /&gt;So the users needed a quick way to locate a specific item within the GridView rather than having to manually search it each time. I added an AJAX Combo Box to the page, which displays an autocomplete selector for the items which also display in the GridView. On it's SelectedIndexChanged event, I needed it to automatically select the corresponding row on the GridView.&lt;br /&gt;&lt;br /&gt;I searched the net to find the best way to do it, but there were several problems with the solutions people had found. There's no point dwelling on those at length, but the main issue was that if you loop through a GridView's DataKeys, you only loop through the DataKeys &lt;strong&gt;for that specific page&lt;/strong&gt;, not the pages which are not currently displayed. The &lt;a href="http://stackoverflow.com/questions/350453/how-to-set-selected-row-in-asp-net-gridview-based-on-datakey" target="_blank"&gt;suggested code&lt;/a&gt; looked like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;For n As Integer = 0 To myGridView.DataKeys.Count - 1&lt;br /&gt;If myGridView.DataKeys(n).Value = myKeyObj Then&lt;br /&gt;myGridView.SelectedIndex = n&lt;br /&gt;End If&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's fine if you only have one page on your GridView, but is not a lot of use when you have enabled paging and you have a requirement to search the entire data set.&lt;br /&gt;&lt;br /&gt;A helpful person on the ASP.NET forums &lt;a href="http://forums.asp.net/p/1327147/3603455.aspx" target="_blank"&gt;posted some code&lt;/a&gt; which allows you to loop through the pages of the GridView, so I modified it slightly and ended up with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim i As Integer, DataSetIndex As Integer&lt;br /&gt;Dim SelectedRowIndex As Integer&lt;br /&gt;Dim dv As DataView = ObjectDataSourceClients.Select&lt;br /&gt;Dim dt As DataTable = dv.ToTable&lt;br /&gt;&lt;br /&gt;For i = 0 To dt.Rows.Count - 1&lt;br /&gt;If dt.Rows(i)("Client_ID") = ComboBoxClientSearch.SelectedValue Then&lt;br /&gt;DataSetIndex = i&lt;br /&gt;Exit For&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;GridViewAllClients.PageIndex = DataSetIndex \ GridViewAllClients.PageSize&lt;br /&gt;SelectedRowIndex = DataSetIndex - (GridViewAllClients.PageSize * GridViewAllClients.PageIndex)&lt;br /&gt;GridViewAllClients.SelectedIndex = SelectedRowIndex&lt;br /&gt;&lt;br /&gt;GridViewAllClients.DataBind()&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Originally, as per the poster's code I had tried to just access the DataSet directly by using:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim ds As DataSet = GridViewAllClients.DataSource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This didn't work and I kept getting null reference exceptions because the GridView's DataSource is not persisted after a PostBack by the ViewState.&lt;br /&gt;&lt;br /&gt;So in this case, I had to access the ObjectDataSource that the GridView was using, fire its Select method and convert the result to a DataTable which I could search.&lt;br /&gt;&lt;br /&gt;That worked nicely, so I &lt;a href="http://forums.asp.net/p/1327147/3603455.aspx#3603455" target="_blank"&gt;posted my findings&lt;/a&gt; back to the forum.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;The above code depends on the GridView and its DataSource being sorted the same way. So if you programatically sort your GridView after it's bound and then attempt to search using the above method, it won't work because the rows in the GridView and its DataSource will be out of sync.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4722589965894695448?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4722589965894695448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4722589965894695448&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4722589965894695448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4722589965894695448'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2010/01/aspnet-search-gridview-and.html' title='ASP.NET: Search GridView and Programatically Select Row'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7581328159799888262</id><published>2009-12-24T14:23:00.009Z</published><updated>2010-01-07T12:16:19.447Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Retreive ID of inserted record</title><content type='html'>I needed to be able to access the returned identifier value from an Insert operation on my ASP page, so that I could use the value in other controls. You can do this by adding an event handler to your ObjectDataSource:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:100%;"&gt;Protected Sub ObjectDataSource1_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs) Handles ObjectDataSource1.Inserted&lt;br /&gt;Dim returnvalue As Int32&lt;br /&gt;returnvalue = Convert.ToInt32(e.ReturnValue)&lt;br /&gt;' Do what you need to do with the ID here&lt;br /&gt;Session.Add("CustomerID", returnvalue)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;When your ObjectDataSource fires its Insert method, the value that the underlying BLL method returns is available for you to use in the above method. You can then set a session variable with this ID or do something else with it.&lt;br /&gt;&lt;br /&gt;Just make sure that your BLL is returning the ID properly, or this won't work.&lt;br /&gt;&lt;br /&gt;Job done!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7581328159799888262?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7581328159799888262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7581328159799888262&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7581328159799888262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7581328159799888262'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/12/aspnet-retreive-id-of-inserted-record.html' title='ASP.NET: Retreive ID of inserted record'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-18789604869620514</id><published>2009-12-23T15:48:00.006Z</published><updated>2010-01-07T12:16:19.448Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Uploading Documents to SQL Server and Retrieving them</title><content type='html'>I've just completed a new function within one of my applications that allows users to upload binary files (such as Word, Excel, PDF, Powerpoint and images) and store them within SQL Server itself, rather than loading the files onto the file system of the web server. This reduces the complexity of the system and means that a backup will take care of all user data, &lt;em&gt;including &lt;/em&gt;their documents.&lt;br /&gt;&lt;br /&gt;There are several steps in getting it set up, none of which are particularly complicated but the documentation I found online was a bit sketchy at best.&lt;br /&gt;&lt;br /&gt;Aside from the database components, the whole lot was done in Visual Studio Express 2008 with Visual Basic.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SQL Server Database Layer&lt;/strong&gt;&lt;br /&gt;The requirement was to be able to upload documents and associate them with individual customers. In order for the browser to know what type of file is being returned, you have to store the MIME type as well as the other bits and bobs:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;CREATE TABLE [dbo].[Client_Document](&lt;br /&gt;[Client_Document_ID] [int] IDENTITY(1,1) NOT NULL,&lt;br /&gt;[Filename] [varchar](128) NOT NULL,&lt;br /&gt;[Description] [varchar](2048) NULL,&lt;br /&gt;[Binary_Document] [varbinary] (MAX) NOT NULL,&lt;br /&gt;[MIME_Type] [varchar](50) NULL,&lt;br /&gt;[Upload_Date] [datetime] NULL,&lt;br /&gt;[Uploaded_By] [varchar](255) NULL,&lt;br /&gt;[User_ID] [varchar](7) NULL,&lt;br /&gt;[Lob_ID] [numeric](38,0) NOT NULL&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The actual file is in the column [Binary_Document] [varbinary] (MAX). Previously, to store files in the database itself, you were encouraged to use the old 'Image' data type, but since SQL Server 2005 this has been deprecated. Instead, use varbinary(MAX) which automatically scales depending on the size of the file inserted (up to 2Gb - you may want to check the file size in code to keep it to a sensible level).&lt;br /&gt;&lt;br /&gt;Then you just need the usual CRUD stored procedures to INSERT, UPDATE, DELETE.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data Access Layer (DAL)&lt;/strong&gt;&lt;br /&gt;First, add your TableAdapter to your XSD file, then add your methods which tie up to your stored procedures. Check that the data type of the Binary_Document column has been set to System.Byte().&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Business Logic Layer (BLL&lt;/strong&gt;)&lt;br /&gt;Create a BLL for the Client Document which defines an adapter based on the Client_Document datatable. Add your BLL methods which map to the methods defined in your DAL. You can add some validation in here or just call the DAL methods directly, passing the arguments which have come from the calling ASP page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Presentation Layer&lt;/strong&gt;&lt;br /&gt;On my ASP page, I have a GridView which displays the current documents associated with the selected customer, as well as a FormView which allows new documents to be added, as well as allowing updates to existing document details (or to overwrite the file with a new version).&lt;br /&gt;&lt;br /&gt;Passing the documents into the database and retrieving them is pretty much the same as anything else you've done, except that you need to capture the binary stream of the selected file and pass it into the database. The file selector control comes for free from the .NET framework:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:FileUpload ID="FileUploadClientDocument" runat="server" Width="320px" /&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then, when you call your methods to save or update you can check the attributes of the selected file, extract its filename, size and MIME type, and save them into the database using your BLL methods, e.g:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;' If a file has been selected, load it into the database with its details&lt;br /&gt;If FileUploadDocument.HasFile = True Then&lt;br /&gt;Dim fileBytes(FileUploadDocument.PostedFile.InputStream.Length) As Byte&lt;br /&gt;FileUploadDocument.PostedFile.InputStream.Read(fileBytes, 0, fileBytes.Length)&lt;br /&gt;&lt;br /&gt;' Display the uploaded file's details&lt;br /&gt;UploadDetails.Text = String.Format( _&lt;br /&gt;"Uploaded file: {0}&amp;lt;br /&amp;gt;" &amp;amp; _&lt;br /&gt;"File size (in bytes): {1:N0}&amp;lt;br /&amp;gt;" &amp;amp; _&lt;br /&gt;"Content-type: {2}", _&lt;br /&gt;FileUploadDocument.FileName, _&lt;br /&gt;FileUploadDocument.FileBytes.Length, _&lt;br /&gt;FileUploadDocument.PostedFile.ContentType)&lt;br /&gt;&lt;br /&gt;' Insert&lt;br /&gt;clientDocumentInfo.AddClientDocument(cloverClientId, FileUploadDocument.FileName, strDescription, fileBytes, FileUploadDocument.PostedFile.ContentType, strAddedBy, strAddedBySid, Session("lobId").ToString) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make sure that you not only define the file's length (line 2), but actually use the Read method of the InputStream to add the data to the variable (I forgot to do this and got files in the database which were the right size but completely blank!).&lt;br /&gt;&lt;br /&gt;UploadDetails is just a label which displays the attributes of the file which has been loaded (size, MIME etc).&lt;br /&gt;&lt;br /&gt;Getting the files back is just a case of retreiving the file from the database using the stored proc, then setting the Response to match the MIME type and the file's binary stream.&lt;br /&gt;&lt;br /&gt;In this case, clicking on the filename in the GridView fires the below code and returns the file to the browser:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If e.CommandName.CompareTo("GetClientDocument") = 0 Then&lt;br /&gt;' Since we are not using the Select command, we have to get the selected Client Document ID from the command arguments.&lt;br /&gt;Dim btn As LinkButton = DirectCast(e.CommandSource, LinkButton)&lt;br /&gt;Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)&lt;br /&gt;' Get the selected document ID&lt;br /&gt;Dim clientDocumentId As Integer = GridViewClientDocuments.DataKeys(gvr.RowIndex)("Client_Document_ID").ToString()&lt;br /&gt;' Invoke the DocumentBLL.AddDocument method to get the file from the database.&lt;br /&gt;Dim clientDocumentInfo As New ClientDocumentBLL()&lt;br /&gt;Dim clientDocuments As cleartrak.cleartrak.Client_DocumentDataTable&lt;br /&gt;Dim clientDocument As cleartrak.cleartrak.Client_DocumentRow&lt;br /&gt;&lt;br /&gt;' Get a table with the appropriate row in it&lt;br /&gt;clientDocuments = clientDocumentInfo.GetClientDocumentById(clientDocumentId)&lt;br /&gt;clientDocument = clientDocuments(0)&lt;br /&gt;' Set the response to the MIME type of the document and its binary contents.&lt;br /&gt;Response.ContentType = clientDocument.MIME_Type.ToString&lt;br /&gt;Response.BinaryWrite(clientDocument.Binary_Document)&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's it - the files are now saved in the database and can be retrieved by a single click.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-18789604869620514?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/18789604869620514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=18789604869620514&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/18789604869620514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/18789604869620514'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/12/aspnet-uploading-documents-to-sql.html' title='ASP.NET: Uploading Documents to SQL Server and Retrieving them'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-109021579214190608</id><published>2009-12-18T11:29:00.005Z</published><updated>2009-12-18T12:50:54.182Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell studio 17'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Dell Studio 17: Resuming itself from Hibernate</title><content type='html'>I use my laptop for development, so I often have ten to fifteen programs open at once, each with various documents open within them. That, combined with the fact that development tools can often be heavy on CPU and memory means that restarting my PC is a pain in the neck. &lt;br /&gt;&lt;br /&gt;So rather than restart or leave it on and waste power, I like to put it into Hibernate mode where it will quickly resume where I left off - no need to reload everything. &lt;br /&gt;&lt;br /&gt;The problem was that if I left it overnight, I'd often come downstairs the next morning to find the Windows welcome screen staring back at me - the laptop had woken itself from Hibernate. This is not ideal, because it might cause it to overheat and its a monumental waste of power.&lt;br /&gt;&lt;br /&gt;I could not figure out why this was happening so contacted Dell support to see what they could do. They were very keen to help, but didn't offer many useful suggestions. They suggested I flash the BIOS, which I did. No luck.&lt;br /&gt;&lt;br /&gt;Then I devoted some time to googling the issue and discovered the problem. &lt;br /&gt;&lt;br /&gt;The setting I had selected in Windows Update appeared to be the sensible option, for Windows to 'Automatically download and install updates for me'. Given the swiss cheese nature of Windows security, I thought this would afford me the best protection.&lt;br /&gt;&lt;br /&gt;But it turns out that with this setting chosen, Windows Update was causing the system to wake from Hibernate to look for updates. How stupid is that? If I wanted it to do that, I would deliberately select such a setting if it was available. And surely if you &lt;em&gt;did&lt;/em&gt; want it to resume to download updates, you would want it to automatically go back into Hibernate? But oh no.&lt;br /&gt;&lt;br /&gt;There was no indication in the Windows Update settings that the system would resume from Hibernate &lt;br /&gt;&lt;br /&gt;Anyway, I now have it set to automatically download updates, but instead of installing them automatically it will ask me to select which ones to install. At the cost of being able to hibernate my machine, I have to ensure that I remember to periodically install the available updates when they download. &lt;br /&gt;&lt;br /&gt;Not the best, Microsoft, not the best.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-109021579214190608?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/109021579214190608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=109021579214190608&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/109021579214190608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/109021579214190608'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/12/dell-studio-17-resuming-itself-from.html' title='Dell Studio 17: Resuming itself from Hibernate'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2397147171078063762</id><published>2009-12-18T11:19:00.008Z</published><updated>2009-12-18T12:56:06.197Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell studio 17'/><category scheme='http://www.blogger.com/atom/ns#' term='tech review'/><title type='text'>Review: Dell Studio 17</title><content type='html'>&lt;div align="justify"&gt;Being an I.T. boy, if you believe in stereotypes you might think I'd have loads of computers everywhere, whirring away, lights flashing. But since my PC blew up last year, I've only had my work laptop to use.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;So the time came when I got sick of typing my password into the encryption program, then waiting five hours for it to boot up and then to get logged into the laptop, only to forget why I switched it on in the first place. Grudgingly at first, I decided that now was the time to get a new computer all of my own.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;It took me &lt;strong&gt;ages &lt;/strong&gt;to choose a laptop. I wanted a fairly high spec machine, since I'll be using it for software development as well as some image editing, and I didn't want to have to replace it after just a year. Plus, if I decide to buy a PC game or two I'd like it if it could run it (even in lower resolutions).&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;After hours poring over which machine to choose, it came down to a short list between the &lt;a href="http://vaio.sony.co.uk/view/ShowProduct.action?product=VGN-AW11M%2FH&amp;amp;site=voe_en_GB_cons&amp;amp;category=VN+AW+Series&amp;amp;assetid=1218032875460" target="_blank"&gt;Sony Vaio VGN-AW11M/H&lt;/a&gt;, the &lt;a href="http://h41112.www4.hp.com/promo/design-theme/uk/en/" target="_blank"&gt;HP HDX18&lt;/a&gt; and the &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/laptop_studio_17?c=uk&amp;amp;cs=ukdhs1&amp;amp;l=en&amp;amp;ref=lthp&amp;amp;s=dhs" target="_blank"&gt;Dell Studio 17&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 640px; CURSOR: hand; HEIGHT: 671px; TEXT-ALIGN: center" alt="" src="http://www.online-photoshoptutorials.com/wp-content/uploads/2008/09/ps-dell_studio_17.jpg" border="0" /&gt; &lt;p align="justify"&gt;I was tempted by the Sony, but the Vaio brand comes at a premium and the reviews said it was too slow to be a proper desktop replacement machine (plus, it's just a big black slab of a thing). The HP machine was very nice to look at and very quick, but too expensive (a rip off, actually), and in the end I decided an 18 inch screen was a little too large anyway. So I spec'd up my machine at Dell: &lt;/p&gt;&lt;p align="justify"&gt;&lt;strong&gt;CPU&lt;/strong&gt;: Intel Core 2 Duo P8400 (2.26GHz, 1066MHz FSB, 3MB cache)&lt;br /&gt;&lt;strong&gt;Display: &lt;/strong&gt;17in Widescreen WUXGA with Truelife - CCFL (1900x1200)&lt;br /&gt;&lt;strong&gt;Memory&lt;/strong&gt;: 4096MB (2x2048) 800MHz DDR2 Dual Channel&lt;br /&gt;&lt;strong&gt;Storage&lt;/strong&gt;: 500GB Serial ATA (5.400RPM) Dual Hard Drive (2x 250GB)&lt;br /&gt;&lt;strong&gt;Graphics: &lt;/strong&gt;256 MB ATI Mobility RADEON HD 3650&lt;br /&gt;&lt;strong&gt;Optical Drive: &lt;/strong&gt;Slot loading Blu-ray Disc (DVD+/-RW + BD-ROM) Drive&lt;br /&gt;&lt;strong&gt;Network: &lt;/strong&gt;WiFi (802.11 a/b/g/n), Bluetooth, built in Vodafone mobile broadband&lt;br /&gt;&lt;strong&gt;Other: &lt;/strong&gt;Backlit keyboard, 2.0 megapixel webcam&lt;br /&gt;&lt;br /&gt;I plumped for the spec above, and managed to get 16% off.&lt;/p&gt;&lt;p align="justify"&gt;The spec is very similar to that of the HP HDX18, but cost me about £200 less. When it arrived on Friday, I was immediately impressed by it. To be honest, I wasn't expecting to like the appearance of the machine too much since Dell's previous offerings have been as dull as a day locked in a room with John Major. But it's nice. The very solid build quality, the nice plastics, the backlit keyboard, a glossy screen and a decent pattern on the lid come together to form a handsome machine.&lt;/p&gt;&lt;p align="justify"&gt;The first thing I did was turn the dreaded User Account Control off, and delete all the crap which Dell preinstalled on the machine. And so far, I'm more than happy with the performance.&lt;/p&gt;&lt;p align="justify"&gt;Most of the other Vista machines I've seen (none have been particularly high spec, to be fair) have shown signs of poor performance when loading up the windows sidebar, and some of the property screens on Control Panel, among other things. But this machine doesn't do that - it loads pretty much everything nice and quickly, fast enough to avoid an irritating wait for windows to render. One benchmark test I had concocted was to see how fast it could convert a 70*40cm GIMP XCF image I'd been working on from RGB to Grayscale. On my work machine (Dell D610, 1.8Ghz CPU, 2 GB RAM), it took about twenty seconds, but on the Studio 17 it took about half that.&lt;/p&gt;&lt;p align="justify"&gt;I paid a bit more and got the upgraded screen (the 1900x1200 WUXGA with Truelife one), and I was not disappointed. It's incredible. Being an extremely high resolution panel, everything on the screen is small, so you can fit a lot on it. Some people hate that, but I like it since I have loads of windows open at once. When playing a video or looking at photos, it really comes into its own, and if you were considering a Studio 17, then I'd upgrade the screen every day of the week. If you don't like the small text of the high resolution screens, you can increase the DPI settings to make everything a bit bigger (but this kind of defeats the purpose of having the high res panel!).&lt;/p&gt;&lt;div align="justify"&gt;The battery life is alright, but I didn't expect much from a machine of this size. I think I'm getting about an hour and a half from the battery, which is acceptable to me since it'll be plugged in most of the time anyway.&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;It's heavy though. Heavier than Michelle McManus leaving McDonald's on a JCB. So it's not really all that portable, but I think if you get a decent messenger bag style case, you'd be able to carry it about without any problems. The weight doesn't really bother me since I don't intend to travel around with my laptop too much, just when travelling sometimes and maybe the odd client visit.&lt;/div&gt;&lt;p align="justify"&gt;My only gripe with it is that there's too much light leakage from underneath the keys, it gets a bit irritating when you're working on the laptop when its on a desk. But the backlit keyboard is still worth the extra cash.&lt;/p&gt;&lt;p align="justify"&gt;So in summary, it's a fast, well built machine with a stunning screen and nice features. Fortunately, with my wallet being several hundred pounds lighter, I'd recommend it to others. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2397147171078063762?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2397147171078063762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2397147171078063762&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2397147171078063762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2397147171078063762'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/12/review-dell-studio-17.html' title='Review: Dell Studio 17'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3918522452879609311</id><published>2009-12-07T12:15:00.003Z</published><updated>2009-12-07T12:21:54.540Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='firebug lite'/><category scheme='http://www.blogger.com/atom/ns#' term='browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='firebug'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Debugging CSS in Internet Explorer: Firebug Lite</title><content type='html'>Firefox is absolutely brilliant for checking your CSS styles and layout when you've installed &lt;a href="http://getfirebug.com/" target="_blank"&gt;Firebug&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It allows you to see where styles have come from in your CSS, and to switch them on or off, or to adjust them to see what changes you need to make to sit your site nicely.&lt;br /&gt;&lt;br /&gt;But when trying to figure out why things look the way they do in the abysmal Internet Explorer, there isn't really an equivalent which is as good. You can try the IE Developer Toolbar which is ok, but like the browser it supports it's very clunky and pretty annoying. &lt;br /&gt;&lt;br /&gt;I'd been waiting for a Firebug equivalent for IE for ages, and then I discovered that there is a version of Firebug itself which is designed for IE, Safari and Opera: &lt;a href="http://getfirebug.com/lite.html" target="_blank"&gt;Firebug Lite&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;All you do is stick a reference to a little remote js in your page, load it up and you have most of the functions of the full, Firefox version of Firebug! &lt;br /&gt;&lt;br /&gt;Nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3918522452879609311?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3918522452879609311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3918522452879609311&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3918522452879609311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3918522452879609311'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/12/debugging-css-in-internet-explorer.html' title='Debugging CSS in Internet Explorer: Firebug Lite'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5781916179873688226</id><published>2009-11-27T12:14:00.003Z</published><updated>2009-11-27T12:17:42.929Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>ASP.NET: Validate email address input using a Regular Expression</title><content type='html'>A nice way to validate an email address which has been entered, using a Regular Expression and absolutely no additional code:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Add a texbox for the input:&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:TextBox ID="TextBoxEmail" runat="server" Text='&amp;lt;%# Bind("Email") %&amp;gt;' Width="200px" MaxLength="255"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Then, add a RegularExpressionValidator:&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:RegularExpressionValidator ID="regexpName" runat="server"&lt;br /&gt;ErrorMessage="Enter a valid email address" ControlToValidate="TextBoxEmail" ValidationExpression="^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Job done - no code, no fuss. It's pretty robust, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5781916179873688226?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5781916179873688226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5781916179873688226&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5781916179873688226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5781916179873688226'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/aspnet-validate-email-address-input.html' title='ASP.NET: Validate email address input using a Regular Expression'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4798887986161518774</id><published>2009-11-26T16:37:00.010Z</published><updated>2009-11-26T16:51:04.636Z</updated><title type='text'>ASP.NET: Setting the maximum number of characters in a multiline text box</title><content type='html'>Bizarrely, ASP.NET includes an out of the box setting which allows you to set the maximum number of characters on an ordinary text box, but &lt;strong&gt;not on a multiline text box&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;Now there may be a good reason for this, and if there is I would love to be enlightened.&lt;br /&gt;&lt;br /&gt;There is no less need for a multiline textbox control to be properly validated than any other text box - perhaps it is even more important since the user might have spent ages typing something in, only to be rebuked for exceeding the maximum number of characters and to be punished by losing what they'd typed.&lt;br /&gt;&lt;br /&gt;A friendly character on the ASP.NET forums offered this simple JavaScript solution:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;function Count(text,long)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var maxlength = new Number(long); // Change number to your max length.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (text.value.length &amp;gt; maxlength){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text.value = text.value.substring(0,maxlength);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert(" Only " + long + " chars");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then just add these to the multiline textbox's markup: onKeyUp=&amp;quot;Count(this,200)&amp;quot; onChange=&amp;quot;Count(this,200)&amp;quot;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4798887986161518774?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4798887986161518774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4798887986161518774&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4798887986161518774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4798887986161518774'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/aspnet-setting-maximum-number-of.html' title='ASP.NET: Setting the maximum number of characters in a multiline text box'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7353743188959899831</id><published>2009-11-25T10:23:00.012Z</published><updated>2010-01-07T12:16:19.449Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='web.config'/><category scheme='http://www.blogger.com/atom/ns#' term='error handling'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>ASP.NET: Adding Error Handling With Email Notifications</title><content type='html'>If you're developing a new application, the temptation is often to get it completed and deployed in the shortest time possible. And sometimes that may come at the expense of proper error handling. So with the best will in the world, sometimes problems do occur in a Production database and the users see an error. &lt;br /&gt;&lt;br /&gt;And with no error handling in your application, that can be a pretty poor experience for the user which can make you look a bit unprofessional and can potentially expose your application to security issues if your settings allow the user to see the Exception Details Yellow Screen of Death. So after I completed a deployment of a major release, I decided it was time to implement some error handling and to enable my application to automatically email me with details of any errors which occurred in Production.&lt;br /&gt;&lt;br /&gt;One of the things think is brilliant about .NET is the documentation. It's terrific. There are tutorials on every subject, and error handling within ASP.NET is very well covered. So basically, the steps to implement are as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1. Add a custom error page with the appropriate look and feel&lt;/span&gt;&lt;br /&gt;Rather than me plagiarise the tutorials on the official ASP.NET web site, here's a &lt;a href="http://www.asp.net/Learn/hosting/tutorial-11-vb.aspx" target="_blank"&gt;link&lt;/a&gt; to a tutorial which explains the concepts involved and will get you up and running with a custom error page which, depending on the type of error, shows a nice message to your users, rather than the Yellow Screen of Death (YSOD):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NfRmgpXyffo/Sw0M_Bi0eoI/AAAAAAAAAHg/O9bLW1QW9Mk/s1600/ysod.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 312px;" src="http://4.bp.blogspot.com/_NfRmgpXyffo/Sw0M_Bi0eoI/AAAAAAAAAHg/O9bLW1QW9Mk/s400/ysod.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5407993004427606658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2. Add a Global.asax file to enable application-wide error handling&lt;/span&gt;&lt;br /&gt;If you followed the tutorial above, when an error occurs the user sees a nicely formatted error message which is in keeping with the rest of your application. But nothing is really done about the error. It's equally important that you are notified of the error, and that you can investigate it with a view to resolving it. &lt;br /&gt;&lt;br /&gt;So the next step is to enable your ASP.NET application to catch any errors, application wide. This is done by adding a Global.asax file which has event handlers for various different application wide events, including trapping errors. The next &lt;a href="http://www.asp.net/Learn/hosting/tutorial-12-vb.aspx" target="_blank"&gt;tutorial from the ASP.NET&lt;/a&gt; website explains the concepts involved and helps you to get an error handler set up. It also shows you how to automatically notify you via email when an error occurs. &lt;br /&gt;&lt;br /&gt;Remember, when pasting any code from the example into your project that you need to import System.Net.Mail at the top of your Global.asax page in order to identify the appropriate classes for sending mail. You also need to add the appropriate mail server settings to your web.config file (you might need to specify a port number and username and password):&lt;br /&gt;&lt;br /&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;    &amp;lt;mailSettings&amp;gt;&lt;br /&gt;      &amp;lt;smtp&amp;gt;&lt;br /&gt;        &amp;lt;network host=&amp;quot;mailhost.*****.net&amp;quot; /&amp;gt;&lt;br /&gt;      &amp;lt;/smtp&amp;gt;&lt;br /&gt;    &amp;lt;/mailSettings&amp;gt;&lt;br /&gt;  &amp;lt;/system.net&amp;gt;&lt;br /&gt;&lt;br /&gt;So now if you've done things by the book, you should be set up to be automatically notified of the details of any errors which occur, and the users should see a nice friendly screen rather than the horrible YSOD. &lt;br /&gt;&lt;br /&gt;Finally, I'm a big fan of using XML for configuration settings where possible, rather than hard-coding them into the application. So you can add some keys to your web.config file which contain the settings you want to use for your email notifications. You could add something like this to appSettings inside your web.config:&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Settings used for email error notifications --&amp;gt;&lt;br /&gt;    &amp;lt;add key=&amp;quot;ErrorToAddress&amp;quot; value=&amp;quot;support@example.com&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;add key=&amp;quot;ErrorFromAddress&amp;quot; value=&amp;quot;aspApp@ example.com&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;add key=&amp;quot;ErrorEmailSubject&amp;quot; value=&amp;quot; aspApp: An error has been logged&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;Then, in your Global.asax file, replace the hard coded values with a call to extract these settings from your web.config:&lt;br /&gt;&lt;br /&gt;&amp;#039; Get the appropriate values from the web.config file&lt;br /&gt;        Dim ToAddress As String = ConfigurationManager.AppSettings(&amp;quot;ErrorToAddress&amp;quot;)&lt;br /&gt;        Dim FromAddress As String = ConfigurationManager.AppSettings(&amp;quot;ErrorFromAddress&amp;quot;)&lt;br /&gt;        Dim Subject As String = ConfigurationManager.AppSettings(&amp;quot;ErrorEmailSubject&amp;quot;)&lt;br /&gt;&lt;br /&gt;This all worked for me, and now my application is more robust, the users don't see any horrible error messages and if any problems occur in Production I'll know about it pretty quickly. &lt;br /&gt;&lt;br /&gt;Hopefully, this might help you to consolidate the necessary parts of what's required to implement some error handling within your application too. But of course, this is no replacement for using proper try-catch error handling where appropriate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7353743188959899831?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7353743188959899831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7353743188959899831&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7353743188959899831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7353743188959899831'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/aspnet-adding-error-handling-with-email.html' title='ASP.NET: Adding Error Handling With Email Notifications'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/Sw0M_Bi0eoI/AAAAAAAAAHg/O9bLW1QW9Mk/s72-c/ysod.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7373159815808811928</id><published>2009-11-20T11:53:00.006Z</published><updated>2009-11-20T12:17:45.008Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net framework'/><category scheme='http://www.blogger.com/atom/ns#' term='403 forbidden'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server reporting services'/><title type='text'>After Upgrading to .NET Framework 3.5: ASP.NET Reconfiguration and Reporting Services 403 error</title><content type='html'>Due to the &lt;a href="http://atominnovation.blogspot.com/2009/11/existing-ssis-packages-generating-new.html" target="_blank"&gt;issues I had with the .NET Framework and SQL Server Integration Services&lt;/a&gt;, I had to roll back the version to 3.5 instead of 3.5 SP1.&lt;br /&gt;&lt;br /&gt;When the upgrade from 3.0 to 3.5 was completed, I had to do a few things to get IIS working again (I was getting errors when attempting to browse to my ASP.NET web sites, and a 403 forbidden error when browsing to a Reporting Services page):&lt;br /&gt;&lt;br /&gt;- Re-register ASP.NET (aspnet_regiis -i from the .NET Framework directory).&lt;br /&gt;- Enable ASP.NET in the Web Service Extensions section of IIS Manager.&lt;br /&gt;- Check that each application was set to use the correct version of ASP.NET&lt;br /&gt;- Check that each application was still set to the correct Directory Security settings.&lt;br /&gt;&lt;br /&gt;At this point, the ASP.NET web sites started working again but Reporting Services was still giving me a 403 forbidden error.&lt;br /&gt;&lt;br /&gt;To get this resolved, I had to delete the ReportServer Virtual Directory in IIS, and then recreate it using the Reporting Services Configuration manager.&lt;br /&gt;&lt;br /&gt;All working again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7373159815808811928?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7373159815808811928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7373159815808811928&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7373159815808811928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7373159815808811928'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/after-upgrading-to-net-framework-35.html' title='After Upgrading to .NET Framework 3.5: ASP.NET Reconfiguration and Reporting Services 403 error'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6015215560963984704</id><published>2009-11-20T10:50:00.002Z</published><updated>2009-11-20T12:20:43.668Z</updated><title type='text'>I Lost My iPhone!</title><content type='html'>Devastated.&lt;br /&gt;&lt;br /&gt;I was at the Kasabian concert at the SECC last week (which was absolutely amazing). At the last song which of course was LSF, I got a text saying that the wife was waiting outside for me to give me a lift.&lt;br /&gt;&lt;br /&gt;I took the phone out to text her back since otherwise she would have no idea how long she would be waiting, and someone knocked my arm hard. My much prized iPhone was launched into the blackness of the undulating crowd in front at what seemed like warp speed.&lt;br /&gt;&lt;br /&gt;Immediately I went after it and created a space in the crowd with my flapping arms and panicked expressions. A few people around me noticed that I was looking for my phone and joined in the search, but it was never looking good.&lt;br /&gt;&lt;br /&gt;The concert finished and after a few more minutes of scanning the floor for a stricken and stamped on iPhone, we were ushered out of the arena by the SECC staff. I reported it to the Control Room at the SECC, the police and O2.&lt;br /&gt;&lt;br /&gt;Over the few days that followed, I realised how much I have grown to depend on my iPhone. Not only for the phone calls and text messages, but for the instant access to my email, Facebook and being able to find out the answer to just about any question I could think of just by firing up Safari. It's hugely sad, I know.&lt;br /&gt;&lt;br /&gt;Thankfully, the phone is insured via my Lloyds TSB bank account. They have a deal with Lifestyle Services Group, and I've been using them to insure my phones for years. In the past when I had to make a claim, I'd just phone them up, tell them what happened, pay the excess and a new phone would be with me a couple of days later.&lt;br /&gt;&lt;br /&gt;Not this time. What a palava.&lt;br /&gt;&lt;br /&gt;Everything is now done via mail and fax, which seems like a step back to me. I had to prove that I had reported it to the Police, O2 and them &lt;strong&gt;within 48 hours &lt;/strong&gt;(thankfully I had) and provide proof of purchase. So the claim form is now with them and I'm hoping that I will be receiving a nice new, shiny iPhone sometime soon. If not, I'm gonna be in trouble.&lt;br /&gt;&lt;br /&gt;The lesson for me? Don't take it to concerts, sign up to &lt;a href="http://www.apple.com/mobileme/" target="_blank"&gt;MobileMe &lt;/a&gt;(if I had done this, I might've been able to find the phone via the GPS tracker if it wasn't broken) and keep backing everything up.&lt;br /&gt;&lt;br /&gt;Though I do have to admit, I have quite enjoyed using the &lt;a href="http://europe.nokia.com/find-products/devices/nokia-6101" target="_blank"&gt;ancient backup phone&lt;/a&gt; which has the ability to make and receive calls, and to send and receive texts - and that's &lt;strong&gt;it. &lt;/strong&gt;It's a simpler way to be, no personal data to worry about, no time spent on checking Facebook or emails, and no notion of entertainment on the go.&lt;br /&gt;&lt;br /&gt;That said, give me an iPhone any day. Please, Lifestyle Services Group, give me an iPhone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6015215560963984704?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6015215560963984704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6015215560963984704&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6015215560963984704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6015215560963984704'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/i-lost-my-iphone.html' title='I Lost My iPhone!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2822727547122617589</id><published>2009-11-20T09:42:00.006Z</published><updated>2010-05-31T11:07:07.945+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssis'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='.net framework'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server integration services'/><title type='text'>Existing SSIS Packages Generating New Errors (.NET Framework)</title><content type='html'>I had been using an SSIS package to load in data from a remote database using the Sybase Adaptive Server Enterprise driver on my own machine and on two 64 bit servers.&lt;br /&gt;&lt;br /&gt;The load was working fine, but then it stopped working suddenly complaining of error code 0x80131937:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;* Error 0xc0209029: Data Flow Task: The "component "Source - Query" (1)" failed because error code 0x80131937 occurred, and the error row disposition on "output column "WhseCode" (12)" specifies failure on error. An error occurred on the specified object of the specified component.&lt;br /&gt;(SQL Server Import and Export Wizard)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But the weird thing was that the exact same DTSX package stopped working on my PC and on only one of the two servers - it kept working on one of them.&lt;br /&gt;&lt;br /&gt;So I tried everything:&lt;br /&gt;&lt;br /&gt;- Stopping the package from failing on error to see what rows would be loaded into the database - every row loaded but every column was set to NULL.&lt;br /&gt;- Rolled Sybase driver back to ASE ODBC 12.5 - this actually worked, but I could not roll the drivers back on the server machines so I had to find another answer.&lt;br /&gt;- I tried several different query formats, but it failed every time.&lt;br /&gt;&lt;br /&gt;Then, I stumbled across &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/dcefa370-82c8-4aea-85be-892bdf49a304?prof=required" target="_blank"&gt;this thread&lt;/a&gt; and the good advice on the .NET framework versions proved to be the answer.&lt;br /&gt;&lt;br /&gt;On my local workstation machine and the server which stopped working, I had .NET 3.5 SP1 installed. But on the server which was still working, the .NET framework was 3.5 without SP1.&lt;br /&gt;&lt;br /&gt;Basically, I removed all versions of the .NET Framework, reapplied .NET 2.0, 2.0 SP1, 3.0 and 3.5 in order and tested the package between each installation.&lt;br /&gt;&lt;br /&gt;Now it's working and the data is loading in just as it should.&lt;br /&gt;&lt;br /&gt;I can't believe that .NET 3.5 SP1 would just break ADO like this. I don't have a problem with compatibility issues between versions of .NET, but some explanation or notification would be useful.&lt;br /&gt;&lt;br /&gt;Oh well, the things you learn.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2822727547122617589?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2822727547122617589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2822727547122617589&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2822727547122617589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2822727547122617589'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/existing-ssis-packages-generating-new.html' title='Existing SSIS Packages Generating New Errors (.NET Framework)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2712746651223358949</id><published>2009-11-17T12:02:00.014Z</published><updated>2009-11-17T12:31:53.821Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='ie6'/><category scheme='http://www.blogger.com/atom/ns#' term='browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Horrors of Internet Explorer 6: Detecting a Visitor's Web Browser</title><content type='html'>&lt;div&gt;I tend to keep up with updates to browsers, so I left Internet Explorer 6 behind in a cloud of dust a long time ago. It's horrible, and craps all over CSS in a way which beggars belief.&lt;br /&gt;&lt;br /&gt;So much so, that several &lt;a href="http://www.bringdownie6.com/" target="_blank"&gt;online campaigns&lt;/a&gt; have been set up to try to get rid of Internet Explorer 6. After all, it is &lt;a href="http://en.wikipedia.org/wiki/Internet_Explorer#Internet_Explorer_6" target="_blank"&gt;eight year old technology&lt;/a&gt; - and a LOT has changed since its release in August 2001.&lt;br /&gt;&lt;br /&gt;So when I discovered that &lt;a href="http://www.atominnovation.com/" target="_blank"&gt;my own website&lt;/a&gt; looks absolutely horrible through IE6, I realised that I had to accommodate this somehow.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_NfRmgpXyffo/SwKVRpZ391I/AAAAAAAAAHI/kuH-XKe2-10/s1600/atomSiteIe6.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5405046633202710354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 339px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_NfRmgpXyffo/SwKVRpZ391I/AAAAAAAAAHI/kuH-XKe2-10/s400/atomSiteIe6.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The market share of IE6 has been dropping steadily throughout 2009, and at the time of writing, accounts for roughly &lt;a href="http://www.w3schools.com/browsers/browsers_stats.asp" target="_blank"&gt;ten percent of browsers on the web&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Rather than try to accomodate such a terrible piece of browser technology, I have decided just to display a message to IE6 users telling them that the site doesn't work for their browser and that maybe it's time for an upgrade.&lt;br /&gt;&lt;br /&gt;Now I realise that a lot of people would object to this, shouting claims of lost custom due to IE6 users just closing the site, and that not everyone can upgrade from IE6 (standardised corporate PC builds etc).&lt;br /&gt;&lt;br /&gt;But I am willing to sacrifice that potential ten percent of visitors to save myself from a complete site redesign which would be out of date in a year when the last IE6 users finally upgrade to something a bit more robust. I also think that some of those ten percent would have another browser on their system, which they may just use to access sites which don't show up properly in IE6 (there must be a few).&lt;br /&gt;&lt;br /&gt;Anyway, the point is that there is a really simple way to detect which version of IE is being used, and display custom messages to the user or to show/hide certain parts of a web page. This &lt;a href="http://www.quirksmode.org/css/condcom.html" target="_blank"&gt;excellent blog post&lt;/a&gt; highlights how it can be done in detail, but basically detecting IE6 can be done using the following simple conditional comment (which is only parsed by Internet Explorer browsers):&lt;br /&gt;&lt;br /&gt;&amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;Special instructions for IE 6 here&lt;br /&gt;&amp;lt;![endif]--&amp;gt;&lt;br /&gt;&lt;br /&gt;Now, a custom message can be displayed and problematic sections of the site can be hidden for IE6 users.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_NfRmgpXyffo/SwKXoIYm4KI/AAAAAAAAAHY/LYWP1NsuKcQ/s1600/aleksandr.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 108px; height: 160px;" src="http://3.bp.blogspot.com/_NfRmgpXyffo/SwKXoIYm4KI/AAAAAAAAAHY/LYWP1NsuKcQ/s400/aleksandr.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5405049218499272866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simples!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2712746651223358949?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2712746651223358949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2712746651223358949&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2712746651223358949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2712746651223358949'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/horrors-of-internet-explorer-6.html' title='The Horrors of Internet Explorer 6: Detecting a Visitor&apos;s Web Browser'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NfRmgpXyffo/SwKVRpZ391I/AAAAAAAAAHI/kuH-XKe2-10/s72-c/atomSiteIe6.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-8261739915473148478</id><published>2009-11-09T10:33:00.005Z</published><updated>2009-11-09T20:41:25.038Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Firefox: This address uses a network port which is normally used for purposes other than Web browsing.</title><content type='html'>When browsing to some sites using Firefox, I got the message:&lt;br /&gt;&lt;br /&gt;"&lt;i&gt;This address uses a network port which is normally used for purposes other than Web browsing. Firefox has cancelled the request for your protection"&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;When you see this message, Firefox completely blocks you from accessing the site you have requested. Since people often need to access non-standard ports for development purposes, this is stupid - the kind of 'nanny' behaviour you would expect from Microsoft, not a company who are normally very 'developer friendly'.&lt;br /&gt;&lt;br /&gt;There is of course, a way around it:&lt;br /&gt;&lt;br /&gt;1. Open Firefox&lt;br /&gt;2. Type about:config in the address field&lt;br /&gt;3. Right click anywhere on the screen&lt;br /&gt;4. Click new &gt; string&lt;br /&gt;5. Enter preference name as: network.security.ports.banned.override&lt;br /&gt;6. Enter string value as: 2049 (or whatever port number you want)&lt;br /&gt;&lt;br /&gt;When you attempt to visit the site again, Firefox will allow it since you have added an exception for the selected port.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-8261739915473148478?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/8261739915473148478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=8261739915473148478&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8261739915473148478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8261739915473148478'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/11/firefox-this-address-uses-network-port.html' title='Firefox: This address uses a network port which is normally used for purposes other than Web browsing.'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4597329795530125076</id><published>2009-10-23T16:28:00.005+01:00</published><updated>2009-10-23T16:32:41.304+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>IIS, ASP.NET: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral' or one of its dependencies'</title><content type='html'>If you receive this error when trying to access a newly deployed application on IIS:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;"Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then check that you have the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&amp;amp;displaylang=en" target="_blank"&gt;.NET framework version 3.5&lt;/a&gt; installed. This was the LAST thing I checked after about a million other things - I wish I had checked that first!&lt;br /&gt;&lt;br /&gt;I'll know for the next time though!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4597329795530125076?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4597329795530125076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4597329795530125076&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4597329795530125076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4597329795530125076'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/iis-aspnet-could-not-load-file-or.html' title='IIS, ASP.NET: Could not load file or assembly &apos;System.Core, Version=3.5.0.0, Culture=neutral&apos; or one of its dependencies&apos;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3631216658886278280</id><published>2009-10-23T15:44:00.004+01:00</published><updated>2009-10-23T15:48:49.262+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='.net framework'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>IIS: "Page cannot be found" error when browsing aspx pages in Windows Server 2003 with IIS 6.0</title><content type='html'>I was configuring a new application, and had re-registered the .NET framework. &lt;br /&gt;&lt;br /&gt;I kept getting a page cannot be found message when I tried to browse aspx pages on Windows Server 2003 with IIS version 6.0 and .NET framework 3.5.&lt;br /&gt;&lt;br /&gt;Apparently it's because in Windows 2003, all the webservice extensions are "Prohibited" by default to ensure security. These settings were restored to default when I re-registered the .NET framework.&lt;br /&gt;&lt;br /&gt;To resolve this, I did the following:&lt;br /&gt;&lt;br /&gt;1. Opened IIS Manager (from a command shell, type inetmgr and press enter).&lt;br /&gt;2. Expanded the appropriate nodes in the IIS to locate the "Webservice Extensions" Node&lt;br /&gt;3. There was a list of "prohibited" extensions in the right.&lt;br /&gt;4. Clicked on ASP.NET and "allow" it&lt;br /&gt;&lt;br /&gt;Worked! Well, I was now back to where I was &lt;em&gt;before&lt;/em&gt; I started mucking about with .NET. &lt;br /&gt;&lt;br /&gt;This article applies to Windows Server 2003, IIS 6.0 environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3631216658886278280?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3631216658886278280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3631216658886278280&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3631216658886278280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3631216658886278280'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/iis-page-cannot-be-found-error-when.html' title='IIS: &quot;Page cannot be found&quot; error when browsing aspx pages in Windows Server 2003 with IIS 6.0'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-503753205181228105</id><published>2009-10-23T09:42:00.004+01:00</published><updated>2009-10-23T09:55:08.304+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='outlook 2007'/><title type='text'>Microsoft Outlook: Attachment field does not appear in header</title><content type='html'>Being a heavy user of Outlook 2007, I found it really annoying when writing an email and adding an attachment when sometimes it would appear in the body of the email, rather than where it should be; on the attachments bar at the header of the message:&lt;br /&gt;&lt;a href="http://blogs.tech-recipes.com/shamanstears/files/2009/04/outlook_copy_send_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 379px; height: 288px;" src="http://blogs.tech-recipes.com/shamanstears/files/2009/04/outlook_copy_send_1.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I thought it was a bug so I kept restarting Outlook but it had no effect. When I created a new message and added an attachment, it would behave the way I wanted.&lt;br /&gt;&lt;br /&gt;Then I figured out that it's something really straightforward. If the message is in Rich Text Format the attachments will appear in the body of the message (which looks messy), but if you change it back to HTML or Plain Text format they will go back to the attachment bar in the header - where they should be! &lt;br /&gt;&lt;br /&gt;Simples!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-503753205181228105?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/503753205181228105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=503753205181228105&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/503753205181228105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/503753205181228105'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/microsoft-outlook-attachment-field-does.html' title='Microsoft Outlook: Attachment field does not appear in header'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7264855969213988208</id><published>2009-10-22T10:55:00.002+01:00</published><updated>2009-10-22T11:00:35.003+01:00</updated><title type='text'>Simple Auto Refresh of ASP.NET Page</title><content type='html'>I have a 'log viewer' page in one of my projects which I need to refresh every ten seconds. &lt;br /&gt;&lt;br /&gt;There are lots of ways to achieve this using JavaScript and nasty code behind bodge jobs but there's a much easier way that only requires one line of code.&lt;br /&gt;&lt;br /&gt;&amp;lt;HEAD&amp;gt;&lt;br /&gt;      &amp;lt;title&amp;gt;Auto-Refresh&amp;lt;/title&amp;gt;&lt;br /&gt;      &amp;lt;meta content=&amp;quot;Microsoft Visual Studio .NET 7.1&amp;quot; name=&amp;quot;GENERATOR&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;meta content=&amp;quot;C#&amp;quot; name=&amp;quot;CODE_LANGUAGE&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;!--The next line of code will refresh the page every 10 seconds--&amp;gt;&lt;br /&gt;      &amp;lt;meta http-equiv=&amp;quot;refresh&amp;quot; content=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;meta content=&amp;quot;JavaScript&amp;quot; name=&amp;quot;vs_defaultClientScript&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;meta content=&amp;quot;http://schemas.microsoft.com/intellisense/ie5&amp;quot; &lt;br /&gt;           name=&amp;quot;vs_targetSchema&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;/HEAD&amp;gt;&lt;br /&gt;&lt;br /&gt;Clearly, content="10" means the interval in seconds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7264855969213988208?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7264855969213988208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7264855969213988208&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7264855969213988208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7264855969213988208'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/simple-auto-refresh-of-aspnet-page.html' title='Simple Auto Refresh of ASP.NET Page'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3192316451978579641</id><published>2009-10-20T12:19:00.004+01:00</published><updated>2009-10-20T12:25:21.518+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='postbacks'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Postbacks Not Working in ASP.NET</title><content type='html'>I was deploying an application to a Development server, and noticed that when I tested anything which caused a postback, the page would simply refresh and the postback would not work.&lt;br /&gt;&lt;br /&gt;When accessing the site on the server itself using the localhost address, it worked fine. &lt;br /&gt;&lt;br /&gt;Bizarre.&lt;br /&gt;&lt;br /&gt;Then I checked if it was working in Firefox, and lo and behold - it was! &lt;br /&gt;&lt;br /&gt;Even more bizarre.&lt;br /&gt;&lt;br /&gt;But &lt;a href="http://www.aspnetresources.com/blog/ie_validators.aspx" target="_blank"&gt;apparently&lt;/a&gt;, it's something to do with validators which are specific to IE. It detects the browser, then if it's IE it sends specific JavaScript down to cause validation of postbacks.&lt;br /&gt;&lt;br /&gt;The solution? Copying the aspnet_client folder into the root of our IIS installation's Default Web Site and restarting IIS. Once I closed my IE session and accessed the site again, the postbacks started working.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3192316451978579641?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3192316451978579641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3192316451978579641&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3192316451978579641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3192316451978579641'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/postbacks-not-working-in-aspnet.html' title='Postbacks Not Working in ASP.NET'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1318157742721062251</id><published>2009-10-16T10:30:00.014+01:00</published><updated>2010-05-31T11:06:55.808+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssis'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='dtexec'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server error'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server agent'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server integration services'/><title type='text'>SQL Server Agent: Error When Running a DTSX Package to load Excel</title><content type='html'>When deploying a project onto a 64 bit Windows Server machine, I noticed an issue with scheduling SQL Server Agent to run a DTSX package to load an Excel file. The error is a bit like this:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered"&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;I could run the package directly using SQL Server Management Studio without any problems, so it's obvious that the issue is being introduced by SQL Server Agent. After rooting around on the net looking for the answer, it seems that the agent is trying to run the package in 64 bit mode.&lt;br /&gt;&lt;br /&gt;There are no 64 bit Excel drivers, so the package fails. For information on the impact that 64 bit architecture has on SSIS, refer to &lt;a href="http://ssis.wik.is/64-bit_Story" target="_blank"&gt;this blog post by Deniz Arkan&lt;/a&gt;, the SQL Server Integration Services Program Manager at Microsoft, and this &lt;a href="http://msdn.microsoft.com/en-us/library/ms141766.aspx" target="_blank"&gt;Microsoft article on the subject&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Many forum posts suggest that the package should be run via the Agent using the 32 bit version of DTEXEC rather than the 64 bit version.&lt;br /&gt;&lt;br /&gt;By default, a 64-bit computer that has both the 64-bit and 32-bit versions of an Integration Services command prompt utility installed will run the 32-bit version at the command prompt. The 32-bit version runs because the directory path for the 32-bit version appears in the PATH environment variable before the directory path for the 64-bit version. (Typically, the 32-bit directory path is &lt;drive&gt;:\Program Files(x86)\Microsoft SQL Server\90\DTS\Binn, while the 64-bit directory path is &lt;drive&gt;:\Program Files\Microsoft SQL Server\90\DTS\Binn.)&lt;br /&gt;&lt;br /&gt;So if you have both 32 bit and 64 bit versions installed, you have to explicitly point to the 32 bit version of DTEXEC on the command line.&lt;br /&gt;&lt;br /&gt;Alternatively, to run a package in 32-bit mode from a 64-bit version of SQL Server Agent, select Use 32 bit runtime on the Execution options tab of the New Job Step dialog box. This depends on your having the 32 bit runtime tools installed.&lt;br /&gt;&lt;br /&gt;For a step by step description of how to run a package from an Agent job in 32 bit, refer to this &lt;a href="http://support.microsoft.com/kb/934653" target="_blank"&gt;Microsoft KB article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But after all this reading, I bottled it. I can't be bothered having to get the 32 bit version of the runtime installed on the Dev, UAT and Production boxes so I decided to get the files I needed converted into a flat file format. This won't suit everyone as not everybody can get their input files changed to a different format, but for me it's the best route.&lt;br /&gt;&lt;br /&gt;Anyway, clearly I am by no means an expert on this subject, but I reckon that Microsoft are trying to discourage people from using 32 bit architecture on 64 bit machines by making this kind of thing difficult to implement, and by not providing 64 bit drivers for their Office products.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1318157742721062251?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1318157742721062251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1318157742721062251&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1318157742721062251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1318157742721062251'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/sql-server-agent-error-when-running.html' title='SQL Server Agent: Error When Running a DTSX Package to load Excel'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1735727819393501996</id><published>2009-10-08T11:50:00.002+01:00</published><updated>2009-10-08T11:54:06.389+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Locating Duplicates in Excel</title><content type='html'>If you work with large Excel files regularly, it can be a pain in the neck to find duplicates in a column of data. &lt;br /&gt;&lt;br /&gt;You could export the file to a text file and load it into a database, and use a query to find the duplicates - but that's probably the sledgehammer approach.&lt;br /&gt;&lt;br /&gt;The problem is that Excel doesn't appear to offer a straightforward way of identifying duplicates, but it can be done using Conditional Formatting.&lt;br /&gt;&lt;br /&gt;Rather than reinvent the wheel and write a detailed how-to here, it's a good idea to link to the definitive authority on the subject: Microsoft. So here's a &lt;a href="http://office.microsoft.com/en-us/excel/ha011366161033.aspx" target="_blank"&gt;link to an article&lt;/a&gt; which shows you how to locate duplicates in a matter of seconds. Hope it's useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1735727819393501996?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1735727819393501996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1735727819393501996&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1735727819393501996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1735727819393501996'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/locating-duplicates-in-excel.html' title='Locating Duplicates in Excel'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-4386363815913486609</id><published>2009-10-07T11:05:00.002+01:00</published><updated>2010-01-07T12:16:19.449Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>ASP.NET: "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level"</title><content type='html'>You may get this error when trying to browse an asp.net application.&lt;br /&gt;&lt;br /&gt;The debug information shows that "This error can be caused by a virtual directory not being configured as an application in IIS."&lt;br /&gt;&lt;br /&gt;When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error. The debug information you get as mentioned above, is applicable to this scenario.&lt;br /&gt;&lt;br /&gt;To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will automatically create the "application" using the virtual directory's name. Now the application can be accessed.&lt;br /&gt;&lt;br /&gt;This solution 'borrowed' from &lt;a href="http://geekswithblogs.net/ranganh/archive/2005/04/25/37609.aspx" target="_blank"&gt;this blog.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-4386363815913486609?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/4386363815913486609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=4386363815913486609&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4386363815913486609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/4386363815913486609'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/aspnet-it-is-error-to-use-section.html' title='ASP.NET: &quot;It is an error to use a section registered as allowDefinition=&apos;MachineToApplication&apos; beyond application level&quot;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6665152141954059902</id><published>2009-10-07T11:02:00.004+01:00</published><updated>2009-10-07T11:07:38.117+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>IIS 5.1: "MMC has detected an error in a snap-in"</title><content type='html'>When using IIS Manager on a Windows Server Enterprise Edition box, the error message "&lt;em&gt;MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC.&lt;/em&gt;" sometimes appears. &lt;br /&gt;&lt;br /&gt;Googled around for a bit, and this seems like a bug that Microsoft know about, but don't care about. Odd! Suppose that's nothing new though:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/915519" target="_blank"&gt;http://support.microsoft.com/kb/915519&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6665152141954059902?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6665152141954059902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6665152141954059902&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6665152141954059902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6665152141954059902'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/10/iis-51-mmc-has-detected-error-in-snap.html' title='IIS 5.1: &quot;MMC has detected an error in a snap-in&quot;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-8365287980508348145</id><published>2009-09-03T16:03:00.011+01:00</published><updated>2010-01-07T12:16:19.450Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio web developer 2008 express'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Visual Web Developer 2008: Failed to load dataset because of the following error: Unable to find connection</title><content type='html'>Somehow, I ended up with two connection strings in my ASP.NET project. &lt;br /&gt;&lt;br /&gt;I don't know where the second one came from (I &lt;em&gt;suppose&lt;/em&gt; it could've been user error), but VSWD called it connectionString1 and without my permission or instruction, modified a whole load of other files in my project to suit. So I just took the sledgehammer approach and removed the second connection string and did a project-wide find and replace on all occurrences of connectionString1.&lt;br /&gt;&lt;br /&gt;I thought I was ok until I got to the point where I needed to make some changes to the DAL of the application, and the following error appeared:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_NfRmgpXyffo/Sp_e__xdX6I/AAAAAAAAAGg/wg5ZJ6rNE-g/s1600-h/dataSetErr.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 95px;" src="http://2.bp.blogspot.com/_NfRmgpXyffo/Sp_e__xdX6I/AAAAAAAAAGg/wg5ZJ6rNE-g/s400/dataSetErr.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5377261671135666082" /&gt;&lt;/a&gt;&lt;br /&gt;The error message isn't exactly self-explanatory and VSWD wasn't exactly helpful. &lt;br /&gt;&lt;br /&gt;So I started panicking, sweat coming from my brow at the prospect of having to spend hours at figuring out the source of this problem, feeling stupid because I felt that I had caused this problem by messing about with settings I didn't understand.&lt;br /&gt;&lt;br /&gt;I could open the DAL .xsd file in Source mode, but could not open it in Design mode. Hmm... seems to be some issue with all of the stuff VSWD does in the background to render the visual portrayal of your DAL...&lt;br /&gt;&lt;br /&gt;Anyway, lo and behold the answer came nice and easily. In my DAL's .xsd file, I had two references to exactly the same connection string. So when trying to load it up it got confused, spat the dummy and didn't bother telling me what the problem was.&lt;br /&gt;&lt;br /&gt;So if you see this problem in your project, check to make sure that &lt;br /&gt;&lt;br /&gt;1) You don't have multiple connection strings in your project where you don't explicitly need them. &lt;br /&gt;2) You don't have duplicate references to your connection strings in your DAL's .xsd file.&lt;br /&gt;&lt;br /&gt;I think that error can be caused by other things, but check those two things first and hopefully it'll help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-8365287980508348145?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/8365287980508348145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=8365287980508348145&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8365287980508348145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8365287980508348145'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/09/visual-web-developer-2008-failed-to.html' title='Visual Web Developer 2008: Failed to load dataset because of the following error: Unable to find connection'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NfRmgpXyffo/Sp_e__xdX6I/AAAAAAAAAGg/wg5ZJ6rNE-g/s72-c/dataSetErr.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5977273369519729885</id><published>2009-08-31T10:16:00.005+01:00</published><updated>2009-08-31T10:25:57.356+01:00</updated><title type='text'>ASP.NET: Server Application Unavailable</title><content type='html'>If you get this error when you try to access your ASP.NET application:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ironspeed.com/designer/4.2.2/webhelp/Part_VI/Part_VI_files/image110.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 615px; height: 141px;" src="http://www.ironspeed.com/designer/4.2.2/webhelp/Part_VI/Part_VI_files/image110.jpg" border="0" alt="" /&gt;&lt;/a&gt; ... it could be caused by a huge number of things. &lt;br /&gt;&lt;br /&gt;It happened to me, and to get more information I went to the Event Viewer where some errors had showed up. Specifically these two errors: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_NfRmgpXyffo/SpuWfaCdo6I/AAAAAAAAAFw/W0UaNilzELI/s1600-h/aspnet_error.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 356px; height: 400px;" src="http://4.bp.blogspot.com/_NfRmgpXyffo/SpuWfaCdo6I/AAAAAAAAAFw/W0UaNilzELI/s400/aspnet_error.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5376056046506582946" /&gt;&lt;/a&gt;&lt;br /&gt;and:&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_NfRmgpXyffo/SpuWwIzpluI/AAAAAAAAAF4/R3SiglbifZM/s1600-h/aspnet_error.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 356px; height: 400px;" src="http://3.bp.blogspot.com/_NfRmgpXyffo/SpuWwIzpluI/AAAAAAAAAF4/R3SiglbifZM/s400/aspnet_error.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5376056333938824930" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ironspeed.com/designer/4.2.2/webhelp/Part_VI/Server_Application_Unavailable.htm" target="_blank"&gt;This page&lt;/a&gt; is quite useful in explaining the potential problems and gives a few ideas for resolution. I went through a lot of them but the answer ended up being very simple. &lt;br /&gt;&lt;br /&gt;The ASPNET user account somehow became locked out, so all I had to do was go into Control Panel &gt; Administrative Tools &gt; Computer Management &gt; Local Users and Groups and look at the properties for the ASPNET account.&lt;br /&gt;&lt;br /&gt;The account was marked as locked out, so I uncleared the checkbox and restarted IIS with an iisreset at the command line. Then I tried to access my application and it worked! &lt;br /&gt;&lt;br /&gt;It was so straightforward, but I still have no idea why the account became locked out in the first place!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5977273369519729885?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5977273369519729885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5977273369519729885&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5977273369519729885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5977273369519729885'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/08/aspnet-server-application-unavailable.html' title='ASP.NET: Server Application Unavailable'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/SpuWfaCdo6I/AAAAAAAAAFw/W0UaNilzELI/s72-c/aspnet_error.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-6152231846019065011</id><published>2009-08-27T16:56:00.003+01:00</published><updated>2009-08-27T17:04:25.158+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinion'/><category scheme='http://www.blogger.com/atom/ns#' term='rumour'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Apple Tablet: Will Steve's New Toy do the Job?</title><content type='html'>Many people apparently believe that &lt;a href="http://mashable.com/2009/07/27/apple-tablet/" target="_blank"&gt;Apple are about to announce a new gadget&lt;/a&gt;, the Apple Tablet.&lt;br /&gt;&lt;br /&gt;Since it's such a work of art, I always thought it would be cool to take an iPod Touch and enlarge it by several times. It looks a bit like the Tablet (if it actually appears) will look just like that.&lt;br /&gt;&lt;a href="http://static.guim.co.uk/sys-images/Technology/Pix/pictures/2009/8/22/1250943709139/Apple-tablet-computer-con-001.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 460px; height: 276px;" src="http://static.guim.co.uk/sys-images/Technology/Pix/pictures/2009/8/22/1250943709139/Apple-tablet-computer-con-001.jpg" border="0" alt="" /&gt;&lt;/a&gt;I really hope that they do release such a gadget, because aside from an iPhone I've never owned a Mac. It looks like it could be the perfect first buy; possibly portable, durable and running Mac OS X, with a user experience that beats the hell out of Windows (not that difficult). &lt;br /&gt;&lt;br /&gt;Of course, it's going to be expensive and demand will undoubtedly reach fever pitch, &lt;br /&gt;so I better start saving!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-6152231846019065011?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/6152231846019065011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=6152231846019065011&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6152231846019065011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/6152231846019065011'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/08/apple-tablet-will-steves-new-toy-do-job.html' title='Apple Tablet: Will Steve&apos;s New Toy do the Job?'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2329724394898165329</id><published>2009-08-13T10:33:00.003+01:00</published><updated>2010-06-03T11:00:18.212+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Posting Code in Blog Posts'/><title type='text'>Posting Code in Blog Posts</title><content type='html'>It's a nightmare trying to post any code in Blog posts. The tags confuse Blogger (fair enough) so if it happens, it won't let you post the code.&lt;br /&gt;&lt;br /&gt;I tried to install &lt;a href="http://code.google.com/p/syntaxhighlighter/" target="_blank"&gt;SyntaxHiglighter &lt;/a&gt;from Google, but it requires you to host its code on a webserver somewhere and I couldn't get it to work.&lt;br /&gt;&lt;br /&gt;Stanley Shilov came up with a nice alternative online tool which you can paste your code into, and it will parse it and replace any characters which will confuse your blogging engine with HTML tags which it'll love. You can &lt;a href="http://www.stanleyshilov.com/online-tools/convert-special-characters-into-html-entities/" target="_blank"&gt;access the tool here&lt;/a&gt;, and it needs zero set up and zero hassle. &lt;br /&gt;&lt;br /&gt;The drawback is that it doesn't offer any syntax highlighting, but it's still useful and I'll certainly be using it in future!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2329724394898165329?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2329724394898165329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2329724394898165329&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2329724394898165329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2329724394898165329'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/08/posting-code-in-blog-posts.html' title='Posting Code in Blog Posts'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5502185608915738769</id><published>2009-08-13T09:59:00.006+01:00</published><updated>2009-08-13T10:35:19.140+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio web developer 2008 express'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>ASP.NET: Adding a simple Ajax Web Service with AutoCompleteExtender in Visual Studio 2008 Express</title><content type='html'>I'd been really struggling to get any kind of Ajax functionality in my ASP.NET project. The first problem was that I couldn't be sure if I had enabled the Ajax extensions in my project, so to verify it I decided to try to create a new 'ASP.NET Ajax Enabled Web Site' template in Visual Studio.&lt;br /&gt;&lt;br /&gt;But I couldn't see that option, and wondered if I had the wrong version of the .NET framework installed. No - that was fine, I had 3.5. So it must be something else. Until I discovered that Visual Studio 2008 Express automatically adds the Ajax extensions to any new ASP.NET project you create in it. So that's good.&lt;br /&gt;&lt;br /&gt;But when I went to add an AutoCompleteExtender to my ASPX page, I couldn't see the control in my Toolbox. This was odd. But EVENTUALLY I discovered that I was missing the AjaxControlToolkit.dll from my project's Bin folder. This comes as part of the Ajax Control Toolkit, which you can download from CodePlex:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 225px; CURSOR: hand; HEIGHT: 23px; TEXT-ALIGN: center" alt="" src="http://static.asp.net/asp.net/images/ajax/go-BLUE-ajax-toolkit.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So I downloaded the Binary package (to avoid all the extra crap that comes with it) and dropped the AjaxControlToolkit.dll into the Bin folder of my Project. Then I right-clicked on the Toolbox in VS2008 and selected Choose Items. Selecting the DLL file now meant that after a couple of seconds of chewing it over, the Ajax controls I needed appeared in the Toolbox.&lt;br /&gt;&lt;br /&gt;Now I had to see if I could get an extremely simple Ajax control set up on my page, just to see if it was working. So I dragged a new texbox onto my page, gave it a name and then dragged a ScriptManager control onto the page. Next, I had to add an AutoCompleteExtender control which would target the text box I chose, and Ajax enable it. &lt;br /&gt;&lt;br /&gt;&amp;lt;cc1:AutoCompleteExtender ID=&amp;quot;AutoCompleteExtender1&amp;quot; runat=&amp;quot;server&amp;quot; MinimumPrefixLength=&amp;quot;1&amp;quot; ServiceMethod=&amp;quot;HelloWorld&amp;quot; ServicePath=&amp;quot;WebService.asmx&amp;quot; TargetControlID=&amp;quot;TextBoxAjax&amp;quot;&amp;gt; &amp;lt;/cc1:AutoCompleteExtender&amp;gt;&lt;br /&gt;&lt;br /&gt;So now I have an Ajax enabled control on my page, and finally I needed to set up a web service to feed it something. So I created a new web service called WebService.asmx and added the following code to it:&lt;br /&gt;&lt;br /&gt;Imports System.Web.Services&lt;br /&gt;Imports System.Web.Services.Protocols&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;&lt;br /&gt;&amp;#039; To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.&lt;br /&gt;&amp;lt;System.Web.Script.Services.ScriptService()&amp;gt; _&lt;br /&gt;&amp;lt;System.Web.Services.WebService(Namespace:=&amp;quot;http://tempuri.org/&amp;quot;)&amp;gt; _&lt;br /&gt;&amp;lt;System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)&amp;gt; _&lt;br /&gt;&amp;lt;ToolboxItem(False)&amp;gt; _&lt;br /&gt;Public Class WebService&lt;br /&gt;    Inherits System.Web.Services.WebService&lt;br /&gt;&lt;br /&gt;    &amp;lt;WebMethod()&amp;gt; _&lt;br /&gt;    Public Function HelloWorld(ByVal testStr As String) As String()&lt;br /&gt;        Dim returnString(2) As String&lt;br /&gt;&lt;br /&gt;        returnString(0) = &amp;quot;one&amp;quot;&lt;br /&gt;        returnString(1) = &amp;quot;two&amp;quot;&lt;br /&gt;        returnString(2) = &amp;quot;three&amp;quot;&lt;br /&gt;&lt;br /&gt;        Return returnString&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;It creates a WebService.asmx.vb file too, which actually contains the code above. So all the HelloWorld function does is return a string array to the Ajax textbox.&lt;br /&gt;&lt;br /&gt;I built and started the app, and voila - when I type something into the box, the values 'One','Two','Three' appear below. It's not smart at all at this point, since the web service just returns those values no matter what is typed into the text box. But it's square one, and it's a good place to start. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_NfRmgpXyffo/SoPchkek3YI/AAAAAAAAAFo/jm7Jh8s0eso/s1600-h/ajax.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 182px; height: 114px;" src="http://4.bp.blogspot.com/_NfRmgpXyffo/SoPchkek3YI/AAAAAAAAAFo/jm7Jh8s0eso/s400/ajax.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5369377650041478530" /&gt;&lt;/a&gt;&lt;br /&gt;Next step, add some proper code to the Web Service which returns the correct autocomplete values based on what's typed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5502185608915738769?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5502185608915738769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5502185608915738769&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5502185608915738769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5502185608915738769'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/08/aspnetl-adding-simple-ajax-web-service.html' title='ASP.NET: Adding a simple Ajax Web Service with AutoCompleteExtender in Visual Studio 2008 Express'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/SoPchkek3YI/AAAAAAAAAFo/jm7Jh8s0eso/s72-c/ajax.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-8948108815238944147</id><published>2009-08-04T11:35:00.002+01:00</published><updated>2009-08-04T11:40:29.208+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>Solution: IIS - You Are Not Authorised To View This Page</title><content type='html'>If you're setting up a new site on IIS, and occasionally (usually after you lock your workstation and log back in, or if you leave it for a long period of time) when you attempt to view a site on your localhost or on another remote machine using IIS - you might see the page displayed which says: &lt;br /&gt;&lt;br /&gt;"You are not authorized to view this page (Error 401.1)"&lt;br /&gt;&lt;br /&gt;If you're allowing anonymous access to your site using the IIS account, a temporary workaround is to run an iisreset at the command line. But a longer term (and less irritating) solution is to go into the Directory Security properties of your Virtual Directory in IIS configuration and uncheck the box which says "Allow IIS to control password". &lt;br /&gt;&lt;br /&gt;Then do an iisreset and the error shouldn't appear again, unless there are deeper problems with your security set up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-8948108815238944147?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/8948108815238944147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=8948108815238944147&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8948108815238944147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/8948108815238944147'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/08/solution-iis-you-are-not-authorised-to.html' title='Solution: IIS - You Are Not Authorised To View This Page'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7816929488303774068</id><published>2009-07-30T10:59:00.002+01:00</published><updated>2009-07-30T11:03:12.627+01:00</updated><title type='text'>Solution: Blank Report Manager (SQL Server 2005 Reporting Services)</title><content type='html'>If, after installing Reporting Services you see a blank screen when trying to open Report Manager, you can try the below methods to get you moving.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_NfRmgpXyffo/SnFvegnOApI/AAAAAAAAAFg/Z1_2bbmMUJ0/s1600-h/ssrsReportManagerBlank.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5364191201116160658" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 259px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_NfRmgpXyffo/SnFvegnOApI/AAAAAAAAAFg/Z1_2bbmMUJ0/s400/ssrsReportManagerBlank.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;If you have an Administrator account on the local machine:&lt;br /&gt;· Enable Integrated Windows Authentication in the Reports (and ReportServer) virtual directories in IIS, and disable Anonymous Access.&lt;br /&gt;· Restart IIS (iisreset on command line)&lt;br /&gt;· Try to open Report Manager. If your account is recognised as an Administrator, you should see more content in Report Manager.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;If you still can't see full content in the Report Manager, then you can try this:&lt;br /&gt;· Add the local anonymous IIS account (IUSR_MACHINENAME) to the Administrators group for the local machine (this is just temporary, read on).&lt;br /&gt;· Restart IIS (iisreset on command line)&lt;br /&gt;· Try to open Report Manager - you should now see full content.&lt;br /&gt;· Go to the Properties tab, and click New Role Assignment. Grant the IUSR_MACHINENAME account the appropriate privileges to access the Report Manager (be careful not to allow too much access since this means your users could change/delete reports).&lt;br /&gt;· Remove the IIS account from the Administrators group for the local machine.&lt;br /&gt;· Enable Anonymous Access for the Reporting Services virtual directories in IIS, and disable Integrated Windows Authentication.&lt;br /&gt;· Restart IIS&lt;br /&gt;· You should now be able to see the appropriate content within Report Manager.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps! It worked for me, and I had been going mad with frustration&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7816929488303774068?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7816929488303774068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7816929488303774068&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7816929488303774068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7816929488303774068'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/07/solution-blank-report-manager-sql.html' title='Solution: Blank Report Manager (SQL Server 2005 Reporting Services)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfRmgpXyffo/SnFvegnOApI/AAAAAAAAAFg/Z1_2bbmMUJ0/s72-c/ssrsReportManagerBlank.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-5848981957420893458</id><published>2009-07-29T12:33:00.003+01:00</published><updated>2009-07-29T12:40:44.855+01:00</updated><title type='text'>SQL Server 2005 Installation: Issues and Resolution (Errors 29559 and 29515)</title><content type='html'>&lt;p&gt;I was attempting to install SQL Server 2005 Developer Edition with the following components, and experienced some issues:&lt;br /&gt;&lt;br /&gt;·         Database Services&lt;br /&gt;·         Analysis Services&lt;br /&gt;·         Reporting Services&lt;br /&gt;·         Integration Services&lt;br /&gt;&lt;br /&gt;I thought it might be useful to share my findings in case a Google search brings up these errors and the resolutions I found, since I eventually managed to get everything installed.&lt;br /&gt;&lt;br /&gt;Some people might have opposing views on the steps I took, but it works now and that's the main thing.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;SQL Server 2005 Error 29559&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Full Error Text (From Windows Event Viewer): &lt;/strong&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;"Product: Microsoft SQL Server 2005 -- Error 29559. SQL Server Setup failed to modify security permissions on service MSSQLServerADHelper for user V024755. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that  exists on the destination drive."&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;Background: &lt;/strong&gt;When attempting to install SQL Server, the following error appeared near the end of the installation when it was attempting to configure Database Services. Was connected to the installation machine over Remote Desktop (mstsc). Had initiall selected to install all of the desired SQL Server 2005 components, with all except database services installing succcessfully in this installation.&lt;br /&gt;&lt;strong&gt;Workaround: &lt;/strong&gt;Logged onto machine directly rather than over mstsc. Checked that domain account was a member of the Adminstrators group. Removed all traces of SQL Server 2000 files from C:\Program Files\Microsoft SQL Server\80. Modified file permissions on all files and folders under that location to allow full control to the appropriate domain account.&lt;br /&gt;&lt;strong&gt;Result: &lt;/strong&gt;The above error did not reappear, the installation proceeded past this point though another error was encountered.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SQL Server 2005 Error 29515&lt;br /&gt;Full Error Text (From Windows Event Viewer): &lt;/strong&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;"Product: Microsoft SQL Server 2005 -- Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Encryption not supported on the client. Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online."&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Background: &lt;/strong&gt;After setup had proceeded past the point of error 29559 above, the installer was attempting to start the database engine service when the above error occurred. The suggestion was that the problem was caused by the fact that some SQL Server 2005 components (Integration Services, Visual Studio 2005 IDE etc) had installed successfully in the very first installation, so there was some kind of conflict caused.&lt;br /&gt;&lt;strong&gt;Workaround:&lt;/strong&gt; Removed all traces of all SQL Server (2000 and 2005) installations to begin from a 'clean slate'.&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Everything except Microsoft SQL Server Setup Support Files - you need this to complete 2005 uninstallation. If this does not appear in Add/Remove Programs, you can reinstall it by running SqlSupport.msi, located in the installation folders.&lt;br /&gt;- Removed everything related to SQL Server which was visible in Add/Remove Programs dialog.&lt;br /&gt;- Followed &lt;a href="http://support.microsoft.com/kb/290991"&gt;uninstall steps for SQL Server 2000&lt;/a&gt; from Microsoft website.&lt;br /&gt;- Followed &lt;a href="http://support.microsoft.com/kb/909967"&gt;uninstall steps for SQL Server 2005&lt;/a&gt; from Microsoft website.&lt;br /&gt;- Deleted C:\Program Files\Microsoft SQL Server and all its contents (You may experience file lock issues when attempting to delete, in this case you can use &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer&lt;/a&gt; to identify which process has a lock on the file and kill it, at your own risk!).- Restarted machine              &lt;br /&gt;- Restarted installation, to install Database Services only. This was done with the goal of minimising risk by introducing installation of other components.        &lt;br /&gt;&lt;strong&gt;Result: &lt;/strong&gt;Installation was successful of Database Services.&lt;br /&gt;- Started installation of remaining components (Analysis Services, Reporting Services, Integration Services), without Database Services.        &lt;br /&gt;&lt;strong&gt;Result: &lt;/strong&gt;Installation of remaining components was successful.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;·         Remove all instances of SQL Server 2000 before you do any installation of SQL Server 2005 whatsoever, do not attempt to upgrade if at all possible.&lt;br /&gt;·         Ensure you have administrator privileges on the machine where SQL Server is being installed.&lt;br /&gt;·         Install Database Services first, before any other components.&lt;br /&gt;·         Once installation of Database Services is successful, then install remaining components.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-5848981957420893458?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/5848981957420893458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=5848981957420893458&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5848981957420893458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/5848981957420893458'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/07/sql-server-2005-installation-issues-and.html' title='SQL Server 2005 Installation: Issues and Resolution (Errors 29559 and 29515)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1920737186913794836</id><published>2009-07-07T11:51:00.006+01:00</published><updated>2009-07-07T12:23:18.540+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='remote desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='tech problems'/><title type='text'>Windows Remote Desktop (mstsc) can't connect: quits unexpectedly</title><content type='html'>I'm in London and I've been trying to establish a remote connection to another machine which I use for development.&lt;br /&gt;&lt;br /&gt;I needed to access it so that I could work remotely while away, but when connecting using Remote Desktop (mstsc on the command line) I could see the log in dialog and enter my details, but as soon as I pressed 'OK' it just quit. No error messages, nothing! &lt;br /&gt;&lt;br /&gt;I tried using the IP address, and the fully qualified hostname but no cigar. What drove me even more mad was that I previously tested that I could connect to the machine when the laptop and desktop were physically right next to each other.&lt;br /&gt;&lt;br /&gt;But as soon as I moved away from the same location, I found I was unable to connect.&lt;br /&gt;&lt;br /&gt;I thought it was something to do with trying to connect to it from another IP subnet, but I managed to connect remotely to a third machine which was on the same subnet, and from there I still could not connect to the target machine.&lt;br /&gt;&lt;br /&gt;I thought it was odd that I could connect to one machine, but not the other. So I did a search of the Microsoft support website, and it turns out that the problem is a dodgy NVIDIA display driver! Apparently it doesn't like people connecting remotely, so it just decides to kill the connection with no error and no warning.&lt;br /&gt;&lt;br /&gt;See this support article: &lt;a href="http://support.microsoft.com/kb/886212/en-us" target="_blank"&gt;http://support.microsoft.com/kb/886212/en-us&lt;/a&gt; which suggests rolling back your NVIDIA driver. &lt;br /&gt;&lt;br /&gt;But in the short term, if you have an NVIDIA graphics card and if this problem has been driving you mad and you are unable to roll the driver back, hopefully this will help. I think the problem is due to the multiple monitor functionality that comes with the NVIDIA driver software. So if you have that enabled, then this might help.&lt;br /&gt;&lt;br /&gt;My resolution was:&lt;br /&gt;&lt;br /&gt;- Get the machine restarted&lt;br /&gt;- It *should* let you log in since there is no session to restore&lt;br /&gt;- Disable the nView functionality &lt;br /&gt;&lt;br /&gt;For me, that meant Bob was my Uncle. But it remains to be seen if I can disconnect and then reconnect to my session on the remote PC.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1920737186913794836?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1920737186913794836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1920737186913794836&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1920737186913794836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1920737186913794836'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/07/windows-remote-desktop-mstsc-cant.html' title='Windows Remote Desktop (mstsc) can&apos;t connect: quits unexpectedly'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-1962706380951196241</id><published>2009-06-26T11:53:00.006+01:00</published><updated>2009-06-26T12:02:15.192+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server error'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server agent'/><title type='text'>SQL Server Job Error: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B</title><content type='html'>If you deploy some DTSX packages to SQL Server, and create an Agent job to run them, you might see this error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The workaround is probably simple. When deploying to your SQL Server and you're on the Specify Target SQL Server page of the wizard, select the 'Rely on server storage for encryption':&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_NfRmgpXyffo/SkSqOMHbKQI/AAAAAAAAAFQ/nPp9wQTpsHY/s1600-h/deploy.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5351589417970247938" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 364px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_NfRmgpXyffo/SkSqOMHbKQI/AAAAAAAAAFQ/nPp9wQTpsHY/s400/deploy.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That should probably do it. If not, check out &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/8519452c-67cb-4864-89de-c0042a82b38c" target="_blank"&gt;this thread on MSDN&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-1962706380951196241?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/1962706380951196241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=1962706380951196241&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1962706380951196241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/1962706380951196241'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/06/sql-server-job-error-failed-to-decrypt.html' title='SQL Server Job Error: Failed to decrypt protected XML node &quot;DTS:Password&quot; with error 0x8009000B'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NfRmgpXyffo/SkSqOMHbKQI/AAAAAAAAAFQ/nPp9wQTpsHY/s72-c/deploy.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-2251861475395288528</id><published>2009-06-25T10:50:00.004+01:00</published><updated>2010-05-31T11:07:07.946+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssis'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server integration services'/><title type='text'>SQL Server Integration Services: Setting Input Filenames Dynamically from a SQL Server Table</title><content type='html'>&lt;p&gt;Being a recent convert from SQL Server 2000, I was used to the DTS framework for importing files to the database. From recent blog posts, you will see that it's been a learning curve in getting completely up to speed with SQL Server 2005's Integration Services.&lt;br /&gt;&lt;br /&gt;When loading files into a database, I obviously found it important to dynamically set the file path so that values were not hard coded, otherwise it became a maintenance nightmare. Especially when promoting the packages to different environments.&lt;br /&gt;&lt;br /&gt;I decided that for my application, the best way to dynamically set these properties was by creating a database table with the details on each file which was to be imported. Then I would extract the filename into the DTSX at runtime and use that to import the file. This way, the filenames would be picked up according to whatever environment the DTSX is running in, and there would be no hard-coded filenames to deal with.&lt;br /&gt;&lt;br /&gt;So I thought I'd share a quick description of how I went about it, as much as a reminder for myself in future as for others who might stumble across this blog.&lt;br /&gt;&lt;br /&gt;The table which contains the import file details is set up as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;CREATE TABLE [Import_File_Specifications](&lt;br /&gt;[ImportFile] [nvarchar] (100) NOT NULL ,&lt;br /&gt;[FileName] [nvarchar] (255) NULL ,&lt;br /&gt;[FileExtension] [nvarchar] (30) NULL ,&lt;br /&gt;[Location] [nvarchar] (255) NULL ,&lt;br /&gt;CONSTRAINT [PK_Import_File_Specifications] PRIMARY KEY CLUSTERED ( [ImportFile] )&lt;br /&gt;ON [PRIMARY] )&lt;br /&gt;ON [PRIMARY]&lt;br /&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I loaded the file specifications into there, and at runtime the DTSX would run some SQL against the table to build the filename based on the folder location, filename and file extension.&lt;br /&gt;&lt;br /&gt;All I did was (this is assuming you're importing a flat file - tab delimited, csv etc):&lt;br /&gt;&lt;br /&gt;1. Create a Package Variable to contain the filename of type String (right click on the Control Flow canvas and click 'Variables') .&lt;br /&gt;&lt;br /&gt;2. Create an Execute SQL Task at the beginning of the DTSX package which flows into the rest of the process with an 'on success' connector.&lt;br /&gt;&lt;br /&gt;3. On the General tab of the SQLStatement setting in the SQL Task, I put:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;select Location + FileName + FileExtension as FileName from Import_File_Specifications where ImportFile = 'xxxx'&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;'xxxx' is the unique ImportFile key for the file you want to use). Set ResultSet equal to 'Single Row' and SQLSourceType to 'Direct Input'.&lt;br /&gt;&lt;br /&gt;4. The next step is to set the Package Variable equal to the filename which comes from the SQL Task. So on the Result Set of the SQL Task, press Add and select Result Name to equal FileName (from the SQL Statement you just entered), and select the Package Variable you created at the beginning.&lt;br /&gt;&lt;br /&gt;5. Now, when the DTSX runs the SQL Task, it should set the Package Variable to equal the filename which comes from the database. The final step is to set the ConnectionString of the file's connection manager equal to the Package Variable which contains the filename. Select the connection manager, and on its properties which appear on the right hand side, click the '...' button which appears when you click the 'Expressions' field.&lt;br /&gt;&lt;br /&gt;6. When the Property Expressions Editor appears, Press the '...' button to add a new expression property and select 'ConnectionString' from the drop down on the left. Then choose your package variable from the drop down on the right hand side. &lt;/p&gt;&lt;p&gt;That's it! When you test your DTSX package, if you've set up everything correctly then the SQL Task should retrieve the filename from the database, set the Package Variable equal to it and pass that into the Connection Manager.&lt;br /&gt;&lt;br /&gt;For an Excel file, you set the 'ExcelFilePath' at runtime rather than the 'ConnectionString' property because the ConnectionString tells the package to use an OLE connection to the file. Note that you must set your PackageVariable to have a default value otherwise the package will not compile.&lt;/p&gt;&lt;p&gt;I admit that this post could have done with more detail, and probably some screen shots but as I said, it's just really a note to remind me of this technique in future. Others have also found different ways of doing this which they might argue are better, but the way I have this set up it works for my application and will allow for different input filenames depending on whether the app is running in DEV, UAT or Production. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-2251861475395288528?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/2251861475395288528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=2251861475395288528&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2251861475395288528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/2251861475395288528'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/06/sql-server-integration-services-setting.html' title='SQL Server Integration Services: Setting Input Filenames Dynamically from a SQL Server Table'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3117528855572253786</id><published>2009-06-25T10:06:00.004+01:00</published><updated>2009-07-07T12:45:30.879+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='palm pre'/><category scheme='http://www.blogger.com/atom/ns#' term='opinion'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='tech review'/><title type='text'>Tech Review: Apple iPhone 3GS</title><content type='html'>It had been a long time since I possessed what could be called a 'good phone'. This is because I always found myself willing to sacrifice having a decent handset for the sake of a free xbox 360, PS3 or Wii with my phone contract. &lt;br /&gt;&lt;br /&gt;I finally got out of contract with Orange, and was dying to get a new phone with unlimited net access because it was becoming more important that I have instant access to email on the move. The only two competitors were the &lt;a href="http://www.palm.com/us/products/phones/pre/" target="_blank"&gt;Palm Pre&lt;/a&gt;...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.geardiary.com/wp-content/uploads/2009/03/palm-pre-webos1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 385px;" src="http://www.geardiary.com/wp-content/uploads/2009/03/palm-pre-webos1.jpg" border="0" alt="" /&gt;&lt;/a&gt; ...and the new &lt;a href="http://www.apple.com/uk/iphone/" target="_blank"&gt;iPhone&lt;/a&gt;. &lt;br /&gt;&lt;a href="http://images.macworld.com/images/news/graphics/141031-iphone3gs_original.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 386px; height: 450px;" src="http://images.macworld.com/images/news/graphics/141031-iphone3gs_original.jpg" border="0" alt="" /&gt;&lt;/a&gt; Both have a touch screen, both have unlimited data access, both can be used as an iPod (the Pre tricks iTunes into thinking it's an iPod), both have GPS and Wi-Fi and just about everything else you can imagine (&lt;a href="http://www.pcworld.com/zoom?id=166330&amp;page=1&amp;zoomIdx=1" target="_blank"&gt;see here for a full side-by-side comparison&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;But initially, when comparing the two online I couldn't help but be more impressed with the Pre. It looks very sleek, and as if a lot of thought has gone into designing both the hardware and the WebOS operating system on it. It has brilliant multitasking capabilities, lots of ways to intelligently organise your data and do cool stuff with GPS and social networking sites. &lt;br /&gt;&lt;br /&gt;That, in addition to the fact that I've never liked the look of the iPhone, meant that for the past couple of months the Pre had been at the top of my wish list.&lt;br /&gt;&lt;br /&gt;At the recent WWDC conference in San Fransisco Apple announced the iPhone 3GS, which is basically a pimped out version of the iPhone 3G handset, with a few new features and a faster user experience. It appealed, but still sat second in my wish list when compared with the Pre.&lt;br /&gt;&lt;br /&gt;Palm have released the Pre in the US already, but for some reason they have not released it in the UK. I think this is because they haven't completed the compatibility with our slightly different GSM networks. &lt;br /&gt;&lt;br /&gt;In the incredibly competitive smartphone market where the Pre is undoubtedly Palm's 'do or die' handset, this is an unbelievable planning error. &lt;br /&gt;&lt;br /&gt;There must be literally thousands of people like me, who wanted a new phone and couldn't decide between the Pre and the iPhone. These people would like to see what the Pre can do, but are not willing to hang around for months until Palm get their act together and set a release date. So I lost patience, and bought a new iPhone 3GS last week. &lt;br /&gt;&lt;br /&gt;It was disappointing not to have the choice between the two, but if Palm want to compete with Apple, they needed to play the game. &lt;br /&gt;&lt;br /&gt;And Palm's move should have been to release the Pre in the UK before the iPhone 3GS, or at least a matter of days or weeks after. Now of course I'm not saying that Palm will fail because I personally did not buy a Pre, but surely it's damaging to their prospective Pre sales that since launch, Apple have sold 2 million iPhone 3GS in the European market alone.&lt;br /&gt;&lt;br /&gt;Maybe they underestimated the importance of the European consumer electronics market. But they shouldn't, have because it could have made the difference between the Pre becoming their saviour, or the iPhone becoming their downfall.&lt;br /&gt;&lt;br /&gt;The point of this post was really to review the iPhone. And I must say, I absolutely love it. It's a complete pleasure to use, and the hype is correct - the App Store is the killer. So many cool little applications to download, and a large portion of them are completely free. It's not perfect though, the email client is a little overly simplistic and the battery life is horrible. But I don't regret for one second buying the iPhone, and by the time the Pre finally hits the UK shores I will be content that I shouldn't have hung about for months with my old Nokia 6300 and chunky Orange contract in tow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3117528855572253786?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3117528855572253786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3117528855572253786&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3117528855572253786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3117528855572253786'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/06/tech-review-apple-iphone-3gs.html' title='Tech Review: Apple iPhone 3GS'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-7866704854043770672</id><published>2009-06-23T11:34:00.000+01:00</published><updated>2009-07-07T12:45:10.861+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server error'/><title type='text'>Implementing Error Handling in SSIS</title><content type='html'>I've been trying to get to grips with SQL Server Integration Services, as opposed to the old DTS technology in SQL Server 2000. It's a task.&lt;br /&gt;&lt;br /&gt;One of the things I've found difficult is to implement error handling, and after poring over much rubbish on the net, I found two useful blogs on the subject. Both of them have reusable code which is easily added to existing DTSX packages.&lt;br /&gt;&lt;br /&gt;Step one is to read &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2005/08/08/1969.aspx" target="_blank"&gt;this blog &lt;/a&gt;by Jamie Thomson at SSIS Junkie.&lt;br /&gt;&lt;br /&gt;Then, &lt;a href="http://www.sqlservercentral.com/articles/Integration+Services/62662/"&gt;this additional blog&lt;/a&gt; adds a lot more detail and allows you to store errors in a database table which is very useful if your application has a lot of flat file data inputs (such as a reconciliation).&lt;br /&gt;&lt;br /&gt;Now I just need to add error handling which will detect if the file is not there at all, and log that too!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-7866704854043770672?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/7866704854043770672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=7866704854043770672&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7866704854043770672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/7866704854043770672'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/06/implementing-error-handling-in-ssis.html' title='Implementing Error Handling in SSIS'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-948243342799425314.post-3764852988846386799</id><published>2009-06-23T10:47:00.001+01:00</published><updated>2009-07-07T12:45:10.861+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server error'/><title type='text'>SQL Server Reporting Services and IIS: Failed to access IIS metabase - Guaranteed Fix</title><content type='html'>I spent ages trying to get SQL Server 2005 Reporting Services working, and kept getting the error "&lt;span style="color:#ff0000;"&gt;&lt;a href="http://www.google.co.uk/search?sourceid=navclient&amp;amp;aq=t&amp;amp;ie=UTF-8&amp;amp;rls=GGLJ,GGLJ:2008-05,GGLJ:en&amp;amp;q=sql+server+reporting+services+failed+to+connect+to+iis+metabase" target="_blank"&gt;Failed to access IIS metabase&lt;/a&gt;&lt;/span&gt;" from IIS.&lt;br /&gt;&lt;br /&gt;After spending ages trawling through documentation, Microsoft KB articles, messing about with security settings and adding Windows and domain users to the IIS metabase, I found the answer in this post which worked perfectly and took less than a minute. If you're having a similar problem, this will solve it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mymcp.blogspot.com/2008/02/failed-to-access-iis-metabase.html" target="_blank"&gt;My MCP: Failed to access IIS metabase.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To summarise his post, you run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;em&gt;%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i&lt;/em&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What's the lesson? Ignore Microsoft and listen to the blogosphere.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Also: if you're just getting started with Reporting Services, &lt;/span&gt;&lt;a href="http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-1/" target="_blank"&gt;&lt;span style="font-size:85%;"&gt;this installation tutorial is the business&lt;/span&gt;&lt;/a&gt;, &lt;span style="font-size:85%;"&gt;and &lt;/span&gt;&lt;a href="http://www.accelebrate.com/sql_training/ssrs_tutorial.htm" target="_blank"&gt;&lt;span style="font-size:85%;"&gt;this one&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt; is superb for showing you how to build and deploy reports.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/948243342799425314-3764852988846386799?l=atominnovation.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atominnovation.blogspot.com/feeds/3764852988846386799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=948243342799425314&amp;postID=3764852988846386799&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3764852988846386799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/948243342799425314/posts/default/3764852988846386799'/><link rel='alternate' type='text/html' href='http://atominnovation.blogspot.com/2009/06/sql-server-reporting-services-and-iis.html' title='SQL Server Reporting Services and IIS: Failed to access IIS metabase - Guaranteed Fix'/><author><name>Phil</name><uri>http://www.blogger.com/profile/16329226949908289863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
