Tuesday, December 02, 2008
But I found this forum post which hopefully will work. It will HAVE to work!

posted on Tuesday, December 02, 2008 5:17:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Monday, November 24, 2008
Adding a dataset to your report model may use a SQL query from an external database. When selecting the ellipis (...) on the Query parameter a list of stored procedures is displayed from the database pointed to by the configured datasource property. If this query does not contain unique names amongst all columns then an error "Property value is not valid" with the detailed message "An item with the same key has already been added". I think this is due to the Dataset object cannot be created using identically named columns (DatasetFieldDefinition).


1. With datasource configured, create your dataset.




2. Select stored procedure as the Query for the Dataset




3. Error message



4. SQL query causing problems

ALTER PROCEDURE [dbo].[mikeGetData]
    -- Add the parameters for the stored procedure here
    @WhichCategory int
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT cat.[Name] as Category, subcat.[Name] as Category
     
        FROM [Production].[ProductCategory] cat inner join [Production].[ProductSubcategory] subcat
            on cat.[ProductCategoryID] = subcat.[ProductCategoryID]

        WHERE cat.[ProductCategoryID] = @WhichCategory


END

posted on Monday, November 24, 2008 1:33:37 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Thursday, January 31, 2008
I'm in the process of converting some web applications from v1.1 to v2.0 which is proving interesting.

Initially I used a blank ASP.NET Web Site and added in the web applications using the IIS option and C# library projects.
I got loads of errors and warnings when compiling. I have needed to qualify the use of my Menu class with its namespace as the Menu class is now part of the framework and some new methods for registering client script blocks. A forum post and some time later I decided to start again using the Web Application Project model (ironic aside: under Step 6 there is a link to a MSDN site regarding breaking changes in v2.0 - it just happens to be a broken link) which is a download for VS 2005.

Overall, I have found this better so far as there are less compilation errors. However, one of the few I had I only got 3 results from google and only 1 usable and correct solution.

The whole solution now compiles but there are some hiccups in the execution which I am still sorting out.

posted on Thursday, January 31, 2008 1:52:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Thursday, January 03, 2008
The beginning of a new year is good time to re-appraise your goals and make some concious effort to identify how best to achieve them. Since I passed 70-536 I've been looking forward to taking others and have considered that a 3-4 month period should be sufficient time to prepare and pass each one, whilst giving a reasonable break before starting the next one. Also, I want to cover other areas outside of the exam criteria to broaden my knowledge-base.

I think 3 exams in 2008 is an achievable target but needs commitment and planning. first up being 70-528. So it's my intention to crack on with the ASP.NET v2.0 and I'm targeting early March to take the exam. I'm also aware of the AJAX phenomenon and how many opportunities nowadays seem to include AJAX as a pre-requisite. Although 70-528 does not include the use of AJAX, it's part of v3.5, and also inevitably part of what users will expect in their interactions with web applications now and in the future. Definitely time to future-proof the skill-set and I've got this eBook which Scott Guthrie recommends amongst others.

Once I complete 70-528, I am turning my attention towards the SQL Server exams. Whether I opt for the 2000 or 2005 version depends upon which I'm using by then. At the moment it would be 2000, but at work I may soon be leveraging Reporting Services on the 2005 platform. There seems few universally recommended books on SSRS out there so the tutorials on MSDN may be the best option to start with. Before the year end I may look at MCPD in web apps and go the whole hog on the web apps route.

As part of these lofty ambitions (!) I've tried to be realistic and have nominally allocated a minimum 2 nights through the week reading between 1-2 hours. Then I will follow up with 1 blog post per week looking at a relevant real-world aspect of what I've learned. Also, there are a number of work-related developments which should push me towards other areas (e.g. web services) and where noteworthy I will blog on technical aspects which is something I have yet to use this blog for.

Some evolutions as well as resolutions then.

posted on Thursday, January 03, 2008 11:08:29 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Monday, November 12, 2007
OK.. I have built a foundation of .NET v2.0 competence. I have passed the exam so I'm quite chuffed.
I'm not sure what more I can say after agreeing to so many non-disclosure-type conditions prior to the exam!!
Watch this space for more .NET developments!!

posted on Monday, November 12, 2007 10:17:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Sunday, November 11, 2007
Ended up re-scheduling last weekend following some dismal test marks after covering the relevant chapters on Security. Have spent last week covering Services, Threading, Application Domains, Configuration, and the weekend covering Debugging, Tracing, Event Logging, COM interop and Reflection.

Have taken most of the MeasureUp tests now, all without reference to materials. When I've been thorough things have gone OK (high 70%s), blotting the copybook have been Security (sub 40%) and COM Interop / Reflection (50%). The main thing now is concentrating on review of the test exam questions. Reviewing areas I haven't looked at for ages i.e. Collections, Generics, Eventing. Areas that have received minimal attention are not going to be revisited now (i.e. Regular Expressions, Graphics)

I've got a couple of spare hours in the morning and then exam is mid-afternoon. I'm feeling that I'm not quite as solid as I'd like to be but it is definitely worth a shot now.

posted on Sunday, November 11, 2007 9:58:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Sunday, October 28, 2007
I've not made the kind of progress I had hoped for this weekend, even with the help of an extra hour with the clocks going back. The upshot is I've re-scheduled for a week later than anticipated, on 7th Nov.

I could point to domestic responsibilities: 4 year olds who refuse to go to bed, the need to mow the gardens before the weather takes a more autumnal turn. Let's be honest here though - there's also the learning of some quite unfamiliar material found in the objectives of 70-536 which has taken more time than I'd expected. For instance, I've sought some additional resources on Code Access Security here and here. It's not something you can just read and absorb first time around. I found some consensus within the comments of the latter CodeProject article.

Also, I've made some efforts to continue with working examples where applicable which can consume time. It's one thing I've done more of compared to preparing for 70-315 which was more taking notes like for a University exam. Below is a code snippet from my tour of 'globalization'. Some things do get overwritten but I've tried to preserve the extent of the exploration. Also, I've never used the code coloriser within DasBlog's admin pages. I've had to do some manual indentation to get things looking more readable.

using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Threading;

namespace GlobalizeThis
{
class Program
{

static void Main(string[] args)

{

Console.ReadKey(true);
}

static void AlreadyTested()
{
//CultureInfoExample1();
//Thread.CurrentThread.CurrentCulture = new CultureInfo("es-VE");CultureInfoExample1();

//FormattingExample1(); CultureInfoExample2(); CultureInfoExample3();

//RegionInfoExample();
//Thread.CurrentThread.CurrentCulture = new CultureInfo("es-VE"); RegionInfoExample();
//Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); RegionInfoExample();

//DateTimeExample1();DateTimeExample2();

//NumberFormat();

//CompareInfoExample1();
//CompareInfoExample2();CompareInfoExample3();

}




static void CompareInfoExample3()
{
string s1 = "Coté";
string s2 = "coté";
CompareInfo demoInfo = new CultureInfo("fr-FR").CompareInfo;

w("if zero then equal. non-zero values indicate differences", demoInfo.Compare(s1, s2, CompareOptions.IgnoreCase).ToString());

}

static void CompareInfoExample2()
{
string s1 = "Coté";
string s2 = "coté";
CompareInfo demoInfo = new CultureInfo("fr-FR").CompareInfo;

w("if zero then equal. non-zero values indicate differences", demoInfo.Compare(s1, s2).ToString());

}

static void CompareInfoExample1()
{
CompareInfo demoInfo1 = Thread.CurrentThread.CurrentCulture.CompareInfo;
w("name of compareinfo", demoInfo1.Name);
w("LCID of compareinfo", demoInfo1.LCID.ToString());

CompareInfo demoInfo2 = new CultureInfo("en-US").CompareInfo;
w("name of compareinfo", demoInfo2.Name);
w("LCID of compareinfo", demoInfo2.LCID.ToString());
}



static void NumberFormat()
{
CultureInfo usersCulture = new CultureInfo("es-VE");
w("Venez Currency", usersCulture.NumberFormat.CurrencySymbol);
w("Number decimal separator", usersCulture.NumberFormat.NumberDecimalSeparator);
}

static void DateTimeExample2()
{
CultureInfo myCulture = Thread.CurrentThread.CurrentCulture;
CultureInfo usersCulture = new CultureInfo("es-VE");

int i = 0;
//string[] months = usersCulture.DateTimeFormat.MonthNames;
string[] months = usersCulture.DateTimeFormat.AbbreviatedMonthNames;
foreach (string venezMonth in months)
{
w(myCulture.DateTimeFormat.MonthNames[i++], venezMonth);
}

w("no of months", months.Length.ToString());
}

static void DateTimeExample1()
{
CultureInfo myCulture = Thread.CurrentThread.CurrentCulture;
CultureInfo usersCulture = new CultureInfo("es-VE");

int i = 0;
string[] days = usersCulture.DateTimeFormat.DayNames;
foreach (string venezDay in days)
{
w(myCulture.DateTimeFormat.DayNames[i++], venezDay);
}
}

static void RegionInfoExample()
{
CultureInfo usersCulture = Thread.CurrentThread.CurrentCulture;
RegionInfo demoRegion = new RegionInfo(usersCulture.LCID);
w("English Name", demoRegion.EnglishName);
w("Display Name", demoRegion.DisplayName);
w("Currency Symbol", demoRegion.CurrencySymbol);
w("Is Metric", demoRegion.IsMetric.ToString());

}

static void CultureInfoExample3()
{
foreach (CultureInfo userCulture in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
{
w("Culture", userCulture.Name);
}
}

static void CultureInfoExample2()
{
CultureInfo usersCulture = Thread.CurrentThread.CurrentUICulture;
w("The current culture of this application is", usersCulture.Name);

}

static void FormattingExample1()
{
w("Salary is", (100000).ToString("C"));
}

static void CultureInfoExample1()
{
CultureInfo usersCulture = Thread.CurrentThread.CurrentCulture;
w("The current culture of this application is", usersCulture.Name);
w("The display name of this application is", usersCulture.DisplayName);
w("The native name of this application is", usersCulture.NativeName);
w("The ISO Abbreviation of this application is", usersCulture.TwoLetterISOLanguageName);
}

static void w(string p, string s)
{
Console.WriteLine("{0} : {1}", p, s);
}
}

}



posted on Sunday, October 28, 2007 9:11:59 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
 Saturday, October 27, 2007
I've decided to throw caution to the wind and book in my exam. I read this blog post about a week ago and was inspired to take advantage of the free second shot. I had a certain amount of pride at passing 70-315 on the first time, but on reflection I probably studied a little too intensively and left the self-testing a little too late before the exam. This time, I've decided to iterate more rapidly through the material with testing sessions after each block.

The appeal of second shot is I can accurately assess areas of weakness using the actual exam first time around. Agreed that not many examination formats allow for this but it seems nonsensical to pass up the opportunity. There remains the possibility that I might even pass (!), although with this weekend and a couple of work days remaining I'm pessimistic of covering enough ground in sufficient detail, although the intention is that I will at least read through everything.

My approach has been to cover the material according to the 7 individual exam objectives. I've used the 70-536 book and its lesson review questions, along with the eLearning material I've been using. I much prefer the style of the book and I alternate freely between the book and the .pdf so its not an online-phobic thing. After covering each objective, I've used the MeasureUp tests and selected the module in question to fire back all the specific questions in the bank. Then, on review I'll focus in on the incorrect answers and refer back to the information sources. I jumped the gun last night on serialization having missed out the XmlSerialization side of things and paid the price (58% and failure!). I'm keeping screen-dumps of all incorrectly answered questions just for later review closer to the exam.

Anyway, must get back to the grindstone.

posted on Saturday, October 27, 2007 10:33:30 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback