Welcome to TheRunTime.com

We are a community of technical bloggers devoted to improving the business of development. This is a place where you will find expert advice on some of the advanced technical topics facing developers today. There will also be tutorials geared at novice developers, and content about the business aspects we must all deal with. Our number one commitment is to keep the content in our main feed relevant, reliable, and useful to you. I hope you enjoy our site and encourage you to subscribe to the main feed today.

Latest Posts

Windows Mobile Devices and Power States

I’ve been doing some Windows Mobile development with the .NET Compact Framework recently and ran into a scenario where I needed the device to be in “full power” mode at all times with the back-light on.  The device is constantly powered, so battery life is not a concern.

The obvious choice is to go into the Brightness and Power control panels and turn off the appropriate settings, but I learned that there is a way to handle this at an application level so the behavior only occurs while the application is running.

Power State

An application can force a specific power state using the SetPowerRequirement method, and release that state using the ReleasePowerRequirement method.  Using P/Invoke, these methods look like the following:

   1: public enum CEDevicePowerState
   2: {
   3:     D0 = 0,    // Full On
   4:     D1,        // Low On
   5:     D2,        // Standby
   6:     D3,        // Sleep
   7:     D4,        // Off
   8: }
   9:  
  10: [DllImport("coredll.dll", SetLastError=true)]
  11: static extern IntPtr SetPowerRequirement(string device, CEDevicePowerState ceDevicePowerState, uint deviceFlags, IntPtr systemState, ulong stateFlags);
  12:  
  13: [DllImport("coredll.dll", SetLastError=true)]
  14: static extern int ReleasePowerRequirement(IntPtr handle);

SetPowerRequirement will allow you to set a specific power state on a specific device.  In my scenario, I wanted to set the back-light to full power.  The name of the back-light on most (not all) Windows Mobile devices appears to be “BKL1:”.  So, to set the back-light to full power (the D0 state), you would call the method as follows:

IntPtr handle = SetPowerRequirement("BKL1:", CEDevicePowerState.D0, 1, IntPtr.Zero, 0);
 
The power state will be returned to its default settings when the application exits, or you may call ReleasePowerRequirement, passing in the handle returned from the call to SetPowerRequirement to reset it yourself.
 
Suspend
 
The above will leave the back-light on at all times, but it will not stop the device from going into a suspended state as configured in the control panel.  To stop this from happening, simply call the SystemIdleTimerReset method at a short, regular interval:
 
   1: [DllImport("coredll.dll", SetLastError=true)]
   2: static extern void SystemIdleTimerReset();
   3:  
   4: // reset the system's idle time every 10 seconds so it doesn't suspend
   5: Timer timer = new Timer(IdleReset, null, 0, 10000);
   6:  
   7: private static void IdleReset(object state)
   8: {
   9:     // no suspend
  10:     SystemIdleTimerReset();
  11: }

Lines 1-2 contain the P/Invoke signature.  Line 5 sets up a timer that will be called every 10 seconds (10000ms) to reset the idle timer, and lines 7-11 are the timer callback method which actually calls the SystemIdleTimerReset method.

And that’s that.  With both of these methods in place, my application remains running with the device at full power, never suspending, and with the back-light always on.

Cross Posted from www.brianpeek.com.

posted @ 7/3/2008 6:00 AM by Brian Peek

Hello TheRuntime!

I'm Thomas Williams, and I blog about SQL Server, Reporting Services, .NET, and development in general.

My old blog at DotNetJunkies was in desperate need of updating - thanks to Jay for setting me up here at my new home! Please subscribe to TheRuntime main feed or my personal feed to make sure you stay up-to-date with my posts.

More about me

I work in the health industry in Frankston, Victoria, Australia and live with my beautiful wife Olivia and 3 young kids. I am an MCP (going for MCAD.NET) and a MCTS in SQL Server 2005.

My full-time job involves writing software to process large amounts of data for enterprise data sources, using SQL Server 2005, SSIS, Reporting Services, and windows and web front ends (this is what I find myself blogging most about too, surprisingly).

I have a personal blog at Thomas Williams.blog, and I also enjoy movies, reading, board games, XBox, and some non-geeky things as well :-)

Tags: , ,

posted @ 6/30/2008 12:50 PM by Thomas Williams

Welcome Thomas S. Williams... or TRT goes global

You may have noticed that our main feed was recently populated with a bunch of of our new blogger Thomas S. Williams posts (the SubText BlogML importer’s fault... sorry about that... I have tried to correct the problem... sometimes I swear that no one who develops for SubText really tests on community-based sites).

Thomas has been blogging for almost as long as I have (4 years). He specializes in SQL and VB. Check out his stuff! Oh yeah, he’s our first non-US blogger (he’s from the land down under).

posted @ 6/29/2008 3:00 PM by Jay Kimble

May 2004 Melbourne SQL Server SIG - Reporting Services Deployment

My musings on the May SQL Server SIG in Melbourne, Australia (a few days late)...

The Rundown
I went to a Special Interest Group meeting at Microsoft in Melbourne a couple of weeks back. I had seen the presenter, Jason Buck, before and once again he demonstrated how well he knew the product (assisted by David from MS and Greg, a consultant tasked with "..extracting out of the community...expertise..."). There were lots of people there (more than I'd seen at an SQL Server SIG before), which is a good indicator of the poularity of this add-on to SQL Server 2000 - I know it's hard to tell a book by it's cover (or a man by his clothes), but looking at the range of people and judging by the suits, there were some BI-type people, some developers, some managers.


The Highlights
Jason focused on deployment and backup. He kind of powered his way through the slides, and part of the reason for that was the side discussions that kept coming up based on questions from the audience. I was hoping to see more "tips and tricks" relating to advanced report design as our deployment here was fairly painless - I guess I'll wait for the "Hitchhiker's Guide to SQL Server 2000 Reporting Services" book (see
http://www.sqlreportingservices.net). One 'wow' factor was a command-line tool to build folders, set permissions and deploy reports called "rs.exe" which used special ".rss" batch files written in VB.NET. Very cool.

The other highlight was the amount of feedback the team running the night asked for, in terms of future topics with the SIG and the desire to build a community. I see this commonly online, but in person I find it's even more rewarding. Looking forward to the next SIG in June (see http://www.local.microsoft.com.au/australia/events/register/home.aspx?levent=268429 for details).

posted @ 6/3/2004 3:46 PM by

Me, Me, Me

Obligatory first post - my name is Thomas Williams, I'm a Melbourne, Australia-based senior systems analyst working mainly with SQL Server (and Analysis Services, Reporting Services) and VB.NET. I'm 30 years old, and I'm looking forward to sharing what I've got with anyone who might be interested!

I've been reading blogs for a year or so now, and writing my own personal blog at http://thomasswilliams.blogspot.com/ since September 2004.

posted @ 6/3/2004 3:51 PM by

SQL Server Developer Centre

Via Early Adopter comes new of an Microsoft SQL Server Developer Centre with the standard articles, downloads and KB's, but also links to blogs and an RSS feed.

posted @ 6/4/2004 2:23 PM by

GUI Design Guidelines

It's a little out-of-date, but the Isys Information Architectssite has a whole lot of examples of good (Hall of Fame) and bad (Hall of Shame) GUIs, dialog boxes and "features" (from I don't know where).

posted @ 6/4/2004 2:33 PM by

GUIs Part 2

While I'm thinking of GUIs, the GUI Olympics (which has to do with skins, rather than full-blown widgets and interfaces) produced some nice looking interfaces. When I ran Mandrake at home I was pleased with the amount of customisation that could be done, being the tweaker that I am.

posted @ 6/4/2004 2:39 PM by

Ohad's Reporting Services Links

Ohad has a list of Reporting Services links that look interesting.

posted @ 6/9/2004 11:00 AM by

MS Application Updater Block

From Brendan, a great step-by-step post on the MS Application Updater block, which I had downloaded months ago and have sitting around for when my app gets closer to deployment (in a month or so).

I also use the Data Access Application Block (V2, currently, as SQL Server support is all I need). I passed over the error logging Application Block in favor of log4net which more than meets the requirements I've got.

posted @ 6/11/2004 2:19 PM by

Finding Stored Procedure/Table Dependencies

Recently I had a problem that I needed to update my stored procedures to point at a new set of tables. I systematically worked through my 3 stored procedures for populating the tables, but I couldn't remember all the stored procedures that accessed them for data retrieval.

Enter information_schema.routines and a tip from Experts Exchange:

select * from information_schema.routines where routine_definition like '%yourtablename%'

The downside is that this searches the stored procedure text (well, the first 4000 characters in the routine_definition column) for the table name, so you'll get hits even where the table name is used in a comment. The upside is that dynamic SQL is accounted for.

posted @ 6/15/2004 11:29 AM by

Upcoming June 2004 Melbourne SQL Server SIG - Replication Lessons from the Real World

Tonight is the Melbourne SQL Server SIG on replication, presented by Adam Thurgar. Replication is not something I know a great deal about - I'm hoping to learn ways to sync our production and development servers as currently I use multiple DTS jobs coded by hand and scheduled with SQL Server Agent. The DTS/SQL Agent approach is very flexible, but I want simple: whenever a new table is added, data is synchronised, and the two servers are kept exactly the same.

Hopefully replication is the answer! I've printed an article from DatabaseJournal called Setting Up Merge Replication: A Step-by-step Guide to read while I'm waiting around beforehand, to at least open my eyes to what can be done.

Anyway I should have more to report on in the coming days.

posted @ 6/15/2004 1:12 PM by

June 2004 Melbourne SQL Server SIG - Replication Lessons from the Real World

Here's my brief overview of Tuesday's Melbourne SQL Server SIG on "Replication Lessons from the Real World", presented by Adam Thurgar at Microsoft Melbourne Offices on Chapel Street:

Adam did a great job presenting the topic (which I have absolutely zero prior experience with), and quickly established his credibility by talking about the work he does with Match.com and it's 90GB database (leaves my largest, at 2GB, looking pretty pathetic). Adam spoke candidly about problems he'd encountered and alluded to several improvements in Yukon, all the while infusing his talk with humour and trying to keep the audience involved. His presentation was mostly theory (no code, no screenshots, no demos) but he was quick to take questions from the group gathered.

The highlight of the talk for me was when he covered three or four "don't do this at home" scenarios where he was able to work around some of the limitations/correct replication mistakes using the SQL Server System Tables. I went along with a particular business need in mind, and so was able to extract enough information to make a decision (my decision was yes, we'll use replication, but I need to do some more research first). I'm looking forward to reviewing the PowerPoint slides Adam used, when they get posted (at the Australian SQL Server User Group site).

There were fewer attendees than the last time when Reporting Services was being discussed, which is no problems because bigger doesn't necessarily mean better. Myself, I struggle with large crowds and have absolutely zero networking skills. Maybe it's time to learn some!

Overall I enjoyed the night from a technical side, and I'm looking forward to the future SIG's which will be targeted at Yukon.

posted @ 6/16/2004 11:27 AM by

Re-indexing Tables with Original Fillfactor

As part of a weekly database job that runs out-of-hours, I re-index all the tables in a particular reporting database. After playing around with index fillfactor I arrived at a fill factor of 90 as the tables are mostly being read and only being updated a couple of times a month. For my key tables, I made sure I set up clustered indexes on the fields that were being used most commonly in my queries (which of course speeds data access up considerably)

I discovered a simple script that would rebuild indexes on all tables in a database to have a fill factor of 90 (see http://www.sql-server-performance.com/rebuilding_indexes.asp), but I wanted more customisation so wrote a script to rebuild all indexes with their original fill factor (some of may tables are set higher as the table is never updated, and some are set lower as the table is updated more often).

So, here's the script, which doesn't actually do the re-indexing, just PRINTs the relevant statements to the Messages window (if using Query Analyzer):

  --table name variable
  DECLARE @TableName VARCHAR(255)
  --index name variable
  DECLARE @IndexName VARCHAR(255)
  --original fill afctor variable
  DECLARE @OriginalFillFactor TINYINT
  --override fill factor (can be NULL)
  DECLARE @OverrideFillFactor TINYINT
  --set override fill factor for indexes here, if required. This WILL overwrite the original value
  --for each index! (If commented out, original fill factor will be used)
  --SET @OverrideFillFactor = 90

  --temporary table for holding all indexes
  CREATE TABLE #tempIndexes 
  (
      index_name VARCHAR(255), 
      index_description VARCHAR(210), 
      index_keys NVARCHAR(2048)
  )
  --temporary table for holding table name, index name, index id and fillfactor
  DECLARE @temp TABLE (
      TableName VARCHAR(255), 
      IndexName VARCHAR(255), 
      IndexId INT, 
      OriginalFillFactor TINYINT
  )

  --set NOCOUNT ON
  SET NOCOUNT ON

  --get all the tables using INFORMATION_SCHEMA.TABLES into a cursor
  DECLARE TableCursor CURSOR FOR
  SELECT  TABLE_NAME 
  FROM    INFORMATION_SCHEMA.TABLES 
  WHERE   TABLE_TYPE = 'BASE TABLE'

  --open the cursor
  OPEN TableCursor
  --get the first row
  FETCH NEXT FROM TableCursor INTO @TableName
  --if we got a valid row, continue
  WHILE @@FETCH_STATUS = 0 BEGIN 
      --clear out the #temp table, containing indexes for the passed table
      DELETE FROM #tempIndexes
      --get indexes into #tempIndexes. This may print a warning message "The object does not 
      --have any indexes.", which can be ignored
      INSERT INTO #tempIndexes EXEC sp_helpindex @TableName

      --insert into outer table, the table name, the index name
      INSERT INTO @temp ([TableName], [IndexName])
      SELECT  @TableName, index_name
      FROM    #tempIndexes

      FETCH NEXT FROM TableCursor INTO @TableName
  END

  CLOSE TableCursor
  DEALLOCATE TableCursor

  --drop the temp index table
  DROP TABLE #tempIndexes

  --now get the index id and original fill factors
  UPDATE  @temp
  SET     IndexId = i.[indid], OriginalFillFactor = i.[OrigFillFactor]
  FROM    sysindexes i, sysobjects o, @temp T
  WHERE   i.[id] = o.[id] AND o.[name] = T.TableName AND T.IndexName = i.[name]

  --lastly loop through the @temp table and re-index
  DECLARE DBREINDEXCursor CURSOR FOR
  SELECT  TableName, IndexName, OriginalFillFactor 
  FROM    @temp
  --open cursor
  OPEN DBREINDEXCursor
  --get first row into local variables
  FETCH NEXT 
  FROM    DBREINDEXCursor 
  INTO    @TableName, @IndexName, @OriginalFillFactor
  --loop through cursor while there are rows remaining
  WHILE @@FETCH_STATUS = 0
  BEGIN
      --if we've been given an override fill factor, apply it here
      IF NOT (@OverrideFillFactor IS NULL) SET @OriginalFillFactor = @OverrideFillFactor 
      --do the re-index operation here
      PRINT 'DBCC DBREINDEX(' + @TableName + ',' + @IndexName + 
          ',' + CONVERT(VARCHAR(3), @OriginalFillFactor) + ')'
      --get the next row
      FETCH NEXT 
      FROM    DBREINDEXCursor 
      INTO    @TableName, @IndexName, @OriginalFillFactor
  END

  --close and deallocate the cursor
  CLOSE DBREINDEXCursor
  DEALLOCATE DBREINDEXCursor

  GO

Some indexing resources I found helpful are at http://www.c-sharpcorner.com/Code/2004/March/SQLPerformanceChecklist06.asp, http://www.extremeexperts.com/sql/articles/BestPractices.aspx and http://www.sql-server-performance.com/rebuilding_indexes.asp.

 

posted @ 6/22/2004 11:39 AM by

Reporting Services SP1

As promised by Microsoft, covered by many many others, and incidently delivered right on time, Reporting Services Service Pack 1 is now available.

I'm getting ready to load it up over the next couple of days. The big thing we've been waiting on is better Excel support (for versions prior to 2002) and grouping in Excel (which was in the beta, but pulled for the final product).

The main gripe I'm hearing from my users is not being able to print directly from Internet Explorer. I believe it's got something to do with IFRAMEs, and the workaround I'm offering is to export to PDF and print it there.

posted @ 6/24/2004 12:02 PM by

Reporting Services SP1 - Installed

Reporting Services SP1 is installed, the installation went really well, and one feature that was in the beta is back: Excel "groups" (the plus/minus rollups in Excel). Believe it or not, this was one of the things that got my boss excited about Reporting Services as many of our managers are familiar with Excel, and when it dropped off in the RTM I had to go through and create some copies of reports specifically for an Excel export.

One strange thing is that there seems to be at least two means of creating expandable groups/hiding report items in the designer, for display in a browser. One way is to set the whole group to being hidden, and set a textbox as a toggle item in the "Grouping and Sorting Properties" dialog (figure 1), another is to set report row(s) as being hidden, toggled by the same textbox (figure 2).

Reporting Services Report Designer 'Grouping and Sorting Properties' dialog (Visibility tab)
Figure 1
Reporting Services Report Designer Row Properties Property Grid
Figure 2

 

The second method creates the Excel "groups" that made me and my boss so happy. I did have a small problem with some wording in the Reporting Services SP1 readme that said:

This service pack is independent of Service Pack 4 (SP4) for SQL Server 2000. If you are installing Reporting Services SP1 after SQL Server SP4 is released, Microsoft recommends that you apply SP4 first.

A search at Microsoft's "Service Packs for SQL Server" (http://www.microsoft.com/sql/downloads/servicepacks.asp) site showed there isn't any SQL Server 2000 SP4, yet, but I found clarification on the newsgroups at http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=f7246d07373b6bb2&seekm=%23koDNGiWEHA.644%40tk2msftngp13.phx.gbl#link3 which had:

The readme was not meant to imply that you need to have SQL Server SP4
before applying Reporting Services SP1. You can apply Reporting Services SP1
now and then later apply SQL Server SP4 when it is released.

The newsgroups also saved me some headache with an error in Visual Studio after applying the Service Pack (it's for client PC's - report designers - as well as for the SQL Server/web server) which read:

Could not load type Microsoft.ReportingServices.Interfaces.CachedDataStatus 

The solution was at http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=b1ccf47d2cd15078&seekm=epuanhTWEHA.2544%40TK2MSFTNGP10.phx.gbl#link7, which said:

Just out of curiosity, would you do a search under the hidden folder:

C:\Documents and Settings\\Local Settings\Application Data\assembly\dl2

for a file named

Microsoft.ReportingServices.Interfaces.*

If it's there, rename it and see if that resolves the issue.  If it does, you may delete the file.
Overall a fairly painless experience, which has improved the functionality of an already pretty good application.

posted @ 6/25/2004 3:27 PM by

Media Center Theme for Windows XP

Stefano and Girish inform us that the official Windows Media Center theme (called Royale) can be used on Windows XP. Cool!

I like tweaking my colors but am not willing to load themes from 3rd-party sites on my work PC (or don't want to get busted), so it's nice to have an option. There's instructions on where to copy the theme to in the RAR file, which can be downloaded from Winbeta.

UPDATE: Stefano alerts us that the theme has been officially released (called “Energy Blue“), and can be got here. You'll have to extract the relevant files with WinRAR and copy them manually to your Resources directory, though, as the installer is designed for Tablet PC's only.

posted @ 6/30/2004 2:09 PM by

Tips for Optimising Reporting Services Performance from tudortr

tudortr has some tips on measuring and improving Reporting Services performance. I heartily agree with number 1: optimise your queries. I've found that using a) proper indexes and b) creating intermediate tables where necessary (possibly containing summarised data from a month that is reported in many different reports, rather than going to the transaction-level original data table, for instance) are the best things I can do to improve performance on my reports.

posted @ 6/30/2004 2:16 PM by

Philip Su Shows Me The Money

Philip has a great post on when he worked on the Money team at MS - funny, insightful, and memorable.

posted @ 7/2/2004 3:10 PM by

URLScan, FlexWiki and Reporting Services

Here's hoping that someone will find this information useful when working with the IIS Lockdown Tool, FlexWiki and Reporting Services. If the URLScan filter is set to a fairly restrictive level, neither Reporting Services or FlexWiki will work (returning constant 404 errors). I found helpful advice at the following pages:

posted @ 7/8/2004 3:12 PM by

Printing a Form in VB.NET

I don't have a need for it right now, but I know one day that Mathias Schiffer's PrintForm replacement for Visual Basic .NET code will come in handy for allowing users to print what they see.

My current solution is “official“, pre-baked reporting via Reporting Services, and I'm using the ComponentOne FlexGrid for on-screen data displays (I wonder if it has a Print method?)

posted @ 7/13/2004 3:04 PM by

Ordering Task Bar Buttons, and Removing "Use the Web Service to find the appropriate program" Dialog

Omer wants ordering of task bar buttons, and I agree. It sounds trivial but I find that every day I order my buttons (from left to right) Outlook, MyIE web browser, Windows Explorer, the rest. I reckon I save 10 minutes a day just by knowing where my browser window is when I'm switching between programs.

On the other hand, Alt-Tab is probably faster than the mouse.

Next, Kevin posts a 5-second registry tip to get rid of the useless “Use the Web Service to find the appropriate program” dialog that comes up when you try to open a file with an unknown extension in XP. Thanks Kevin!

The Web Service link is still available at the bottom of the “Open With” dialog, so you get the best of both worlds.

UPDATE: Mis-spelt Omer's name - thanks Omer for the notification. Sorry for the inconvenience!

posted @ 7/14/2004 11:59 AM by

Realisations

Jeff reflects on 3 years of experiences and priorities, thinking he was happy (but realising he was actually miserable) and doing something about it. He writes about the need for support (and sounds like he's very grateful that he got that from his wife), self-esteem, balance and ability to take risks (and a lot of other stuff that you'll have to read for yourself).

His post made me think of a time when I felt down in general and I felt bad about my job and future prospects, and I realised something: it's OK to feel bad. I'm learning from that and I still spend a lot of time trying to make myself feel better or avoid bad feelings entirely rather than accept the fact that I'm not always going to feel great, and just get on with things.

Jeff's post also highlights for me a need to be able to take risks:

Finally, the inability to take risks will keep you forever stuck in the same place.

Something to work on!

posted @ 7/20/2004 2:57 PM by

Melbourne SQL Server SIG review for July - SQL Server 2005: What's new in the relational and storage engines

Tony Bain (from Red Rock SQL Services), a Microsoft SQL Server MVP, spoke at Wednesday night's SQL Server SIG at the Microsoft offices in Melbourne. His primary topic was improvements in the core technology of SQL Server over the 2000 version. Tony has been using the software for the last 12 months - since the first beta - and had lots of insights to show for it.

Tony started off explaining that this was a "What's New"-type session, which meant a brief overview of the improvements without any real advice on how to implement them in the real world. Left out of the night's discussion were .NET integration, Reporting Services, Analysis Services, XQuery, and more (which Tony labelled as the "cool" parts of Yukon), and the focus was on the sort of improvements that a DBA is going to spend time in, namely the relational and storage engines and the changes there. Tony discussed (this is not an exhaustive list):

  • replacements for TEXT, NTEXT and IMAGE (BLOB) datatypes: VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) which can be searched in WHERE clauses
  • the ability to take a read-only snapshot of a database at a particular point in time and run queries against them (he admitted one of the shortcomings of these snapshots were that they could not be backed up)
  • referring to queries as variables (Tony called these run-time views), although I didn't see much difference from the current TABLE datatype except that declaration and population can be done at the same time
  • recursive queries, with the afore-mentioned run-time views...I liked the sound of this!
  • inbuilt function to see how often your indexes were being used
  • ability to include columns in an index, that are not part of the actual index but are stored with the index to save the query going back to the table to get the field
  • triggers on Data Definition Language (DDL) statements, e.g. every time a table was added to your database, a trigger could fire
  • more consistent DDL statements - basically a CREATE, ALTER and DROP for almost any object you can think of - to reconcile DBCC commands, extended stored procedures and normal DDL statements
  • function to return the SPID, Transaction name and running time of currently open transactions
  • TRY...CATCH blocks - Tony explained that they currently only caught one type of exception, a transaction fail exception
  • select a random number of rows from a table (very fast)

There was more, but I honestly can't remember all the new things. Suffice to say there is a lot to learn!

I was amazed at how many changes and improvements Microsoft had worked into SQL Server 2005, even given the limited range that Tony covered. Greg Linwood from the user group mentioned that last night's event was the first of a series of Yukon presentations, with the August SQL SIG in Melbourne titled Changes to Backup and Recovery in SQL Server 2005. Looking forward to it...

posted @ 7/22/2004 12:03 PM by

Pivot Tables/Horizontal Tables With Reporting Services

Chris Hays shows step-by-step how to do “horizonal tables” (fixed rows, variable columns) with Reporting Services. I'm bookmarking this to have a look at later.

Chris uses the matrix which is an interesting Reporting Services control. I've used this in the past to take advantage of the multi-level drill-down which I reckon is slightly easier to use than a table control. The subtotals are easier than tables too, but there's a trade-off because with the table you have very tight control over what gets displayed, and how, compared to the matrix.

posted @ 7/26/2004 3:04 PM by

'Favorite' Tip from IE Blog

The IE blog at MSDN has a quick tip for IE, where giving an IE Favorite a one-word name allows you to type that one word into your address bar to go to the Favorite URL.

That's interesting for me, I probably still prefer two mouse clicks. But, even more interesting than this, check the stats on the IE blog:

posts - 9, comments - 825

That has to be the highest comment to post ratio ever!

 

 

posted @ 7/28/2004 3:31 PM by

Roy's Visual Studio.NET Add-In Contest

I haven't had time to download any of them yet, but the submissions for Roy Osherove's Add-In Contest for Visual Studio.NET look good. Something to get back to later, I guess...

posted @ 7/29/2004 12:20 PM by

C# to Visual Basic Translation Tool

August's MSDN Magazine has a C# to Visual Basic Translation Tool which will take a whole C# project and convert it to a VB.NET project.

I have used the resources that the author John Robbins mentions for small snippets of C# (ConvertCSharp2VB and C# to VB.NET Translator), but the ability to convert a whole project sounds pretty good.

posted @ 7/29/2004 1:57 PM by

Source Control Options

I'm on a development team of 1, so source control isn't a huge or pressing issue for me. The biggest advantages of having source control is for rolling back to earlier versions, and using a diff tool to see what I've changed. It also means I follow some better practices than just developing away, heedless of key files I might overwrite, or changes I might make that break a system.

About a year ago I set up CVS, which worked pretty well. It took a lot of fiddling to get working just right, but when I figured out the securities and settings, Visual Studio.NET played along pretty nicely with it (using Jalindi Igloo). I would give either of those two products a hearty recomendation to anyone interested in CVS source control on Windows.

Then the Windows 2000 server I had CVS working on started playing up - it had very little memory, I was asking a lot of it, and I had a whole bunch of demo and beta software on it that meant it needed a rebuild. Eventually we got a new server instead of rebuilding the old one, and eventually that new server got repaved after a power blackout (long story).

So now I feel I'm back at square one. I've downloaded Vault and Subversion (thanks to Steve Eichert for an interesting & informative post on Subversion) and I'm poised, ready to pull the trigger and go with one of them. I'll have to try them both out, of course. Leaning towards Subversion as it's open source and that means that others can come on board without having to cough up dough for licenses. Alternatively, I've expressed interest in a project out of hours that uses Vault, so maybe getting to learn that would be good. Vault has the fact that it's a mature and supported product going in its favour.

Add to this the new Team System on the horizon, and it makes for a lot of source control options!

posted @ 7/30/2004 2:29 PM by

Inductive User Interface MSDN Sample, in VB.NET

Michael Weinhardt's excellent article IUIs and Web-Style Navigation in Windows Forms, Part 1 describes how to create an “inductive” (I consider it to be like a task-based) user interface, like the Windows XP "Workgroup-Mode User Account Management" or the Office 2003 Research Pane. I can't do a very good job explaining inductive versus deductive user interfaces; there's an old article at MSDN that gives the complete run-down.

The other day and had a play around with the download which is in C#. Michael has created a neat little way to get a wizard-like interface (that's also capable of much more) and Windows Forms as almost web pages inside a container. Each “page” is designed using the Visual Studio designer window, allowing for a lot of control.

Converting the sample app that uses Michael's C# “Navigation“ framework to VB.NET was fairly straightforward using the C# to VB.NET Translator - I created a new VB.NET project and converted one file from the MSDN sample, "PageTemplate.cs", to "PageTemplate.vb", and then the other pages inherit from this - and only a simple change in syntax is necessary for “hyperlinking“ to pages:

C# syntax for displaying a page: Go(typeof(<form>));
VB.NET syntax: Go(GetType(<form>))

I hope this helps anyone attempting to work with the MSDN sample in VB.NET 2003. I don't have anywhere to post the VB.NET project, please let me know if it would be of use to you.

posted @ 8/6/2004 11:08 AM by

Build Regime (or lack of)

As mentioned before, I pretty much work in a one-developer shop. This is not an excuse!

When I started a fairly sizable project last year, I tried to start off right and set up CVS for source control, learned how to use NAnt to build my solution, did some playing with NUnit for tests and also set up NDoc to do my documentation.

A year and a half later I look back with regret that I ditched all of these in favor of...nothing. I was worried about the maintenance around my whole “build regime“ and it seemed like all my effort was adding nothing of value to the project. I deleted my NAnt build files, didn't keep up with the many NUnit upgrades and add-ins and have not got any documentation to show.

My project is getting bigger and bigger (of course!) and I hope I'm learning my lesson - that tools like I've mentioned keep things in check rather than add to the complexity in the long run. So now I'm leaning back towards NAnt, I've swapped to Subversion (which I've pretty much installed) for source control and I'm trying to find good bug/issue tracking software for when my app goes out “into the wild”.

To get me started I'm looking at a great article on 15 Seconds called “Using Open Source .NET Tools for Sophisticated Builds”, and also Jan Tielens' NAnt BuildFile Builder (via Girish).

posted @ 8/10/2004 3:20 PM by

Geek Laughs

Only a geek could laugh at some of the jokes Devankur Thakur has collected.

I also found out my brother likes Dilbert, I thought I was the only one in my family!

posted @ 8/13/2004 2:20 PM by

Determining if you have Windows XP SP2

With Windows XP Service Pack 2 released, it would be handy to determine if you have it installed programatically (using C# or VB.NET). Saar Carmi points me in the right direction to KB 304721.

Related is KB 304283 which explains how to find out Windows versions in C# using the System.Environment.OSVersion structure (I don't know if it detects SP2, as I don't have SP2 yet...at least now I'm able to check!)

posted @ 8/20/2004 2:42 PM by

Local Weather via RSS

This is a good utilisation of an existing technology e.g. airport locations, free weather availability and RSS (via Alex Barnett). This link lists countries outside the US and Canada that the service supports, and Melbourne weather is here (using ICAO code YMML).

This is handy to be able to tell the wife when it's OK to hang washing on the line, or to know if I need my umbrella to walk out to the car. I don't know if I've got a use for visibility, windspeed, and barometer readings just yet, but it is handy to have this kind of news delivered to me if I need it.

posted @ 8/20/2004 3:01 PM by

E-mail to RSS

Lately I had to sign up to a site to get access to the answers to questions posted on their forum. How did I know that the site had answers? Well, Google showed me the question and part of the answer when I searched for the exact error message for a problem I was having, but when I followed the link from Google to the site I found I couldn't view the answer unless I became a (free) member.
 
I retreated back to Google to find to my dismay that there's no cached copy of the page I want. So, I became a member of the site, found the answer, and moved on. Now, two weeks later, I notice I've got two weekly newsletters from the site in my inbox.
 
This is not a problem as the newsletter is actually quite good, but it's just that I don't want to put aside time to read mailing-list type stuff on my personal e-mail. Luckily this site has the option not to receive newsletters and has an RSS feed, so I can still read the content when I read my feeds and my inbox stays clean.
 
I did some quick hunting around to find two sites that will give out an e-mail address and then allow you to subscribe to your “inbox” using RSS:
 
This seems like a useful service to have. I'll give one or both of them a try and see how I go.
 
UPDATE: To use MailbyRss you sign up, they provide you with an e-mail address (a GUID), and whenever you mail something to this mail address it is “posted” to a web page that's kind of like a blog-lite, which has an RSS feed. Pretty simple. MailbyRss allows two optional tags in the e-mail that you send to be “posted” - an abstract for the entry, and an alternate date for the date of the posting.
 
MailbyRss looks like it is set up for corporate users as a subset of a larger suite of tools. Its creators advertise it as another information stream to potential buyers of your product or existing users for support.
 
The advantages of MailbyRss are that it would be hard for someone to guess the e-mail address used to post. The resulting content is available to anyone, though.
 
MailBucket seems similar but both the e-mail used to post and the resulting content are open to anyone. It seems to be targeted at developers who do not have time to read all the posts on a mailing list and instead prefer to consume the information using RSS. I think the downfall is lack of unique identity - there's no sign up, just check if your desired address is in use (the e-mail address for the “inbox“ becomes the web address to get the RSS from) - which means mailing list information I send to a MailBucket e-mail address might be hijacked by someone else (unless I'm getting the site horribly wrong, which is a possibility).

posted @ 8/29/2004 8:51 PM by