Sorry for not posting for awhile, but I am sure you are all familiar with the holiday “black hole” effect.

Strongly Typed Datasets Tutorial Nixed

I wanted to take this opportunity to also explain that I am nixing my “Typed Dataset” tutorial series. In doing the research for this I initially had a very favorable view of this technology. Now, after attempting to use it in a production application I have to say my view is considerably less favorable. I wanted to wait until I had a chance to apply SP1 to Visual Studio 2005 and see if it resolved any of these issues. Sadly, it did not.

What I will do is post a more detailed analysis of what I encountered in attempting to use Strongly Typed Datasets and why I found the issues to be serious enough to no longer pursue using them.

On Vista

Vista is about to be released for consumer purchase, is already available for business use and on the MSDN library. I however have no intention of installing it on my primary laptop. Not until a number of issues are resolved. Not least of which is the near impossibility of getting my development environment and tool set installed and running on Vista.

Those of you that know me may be shocked to hear me say this, but I no longer put anything with either Beta or CTP status on my development system. I have been nailed too many times and ended up having to repave my system in order to get work done. So now I use a Virtual Machine to play on. I wish VM’s had been around 10 years ago, with the capabilities they have now. It would have saved me a lot of pain and anguish.

I will (and have) installed Vista in a VM in order to test my applications on, but there are still far too many incompatibilities with even Microsoft’s own tools to use Vista as a development platform. I have heard of some folks being able to get everything running on Vista, but far more often I have heard of horror stories and days of lost productivity due to the attempt.

When SP1 comes out I will give it another look.

Other Stuff

I recently converted one of my development systems to a Windows Server 2003 R2 Standard Edition server! This enables me to begin playing with more of the newer technologies from a server perspective. One of the first things I did was install Virtual Server on the new server, I will use that to run a Team System Foundation Server in a VM so I can begin to get used to what TFS has to offer. I am also anxious to get back up to speed on Active Directory and LDAP programming and since I installed AD on this server I should now be able to do that. (Wonder if I can get a Linux Server running as a VM as well and play with AD and LDAP connections?)

Robert Porter


 
Categories: Misc


In the last (and first) post of this series we discussed how to create a typed dataset. Now that we have our dataset we need to see how to use it.

But before we go into the details, I want to explain something that I stumbled upon in my research. There is a serious bug in the implementation of the dataset generator. It effects retrieving and manipulating childrows when you are dealing with related tables.

After a great deal of hair pulling, self doubt, and serious coffee consumption, I finally found a series of blog posts that ended up leading me here. The bug has been confirmed and will be released: “thanks again for reporting this. We fixed this problem and the fix will be available in the next Visual Studio release.”

Description
When you create a typed DataSet using the class-designer of VS.NET with a parent- and a child-table, a method is generated on the parentrow-class which should return the childrows. This method uses DataRow.GetChilds with the name of the relationship. This method returns a parentrow-array instead of a childrow-array. The generated method casts it to a childrow-array and thus causes a InvalidCastException.
This bug reduces some of the functionality of the typed dataset in production applications. There is a workaround, but it is a simple kludge, and the end result is that you cannot easily work with related data.
 
Ok, with that said, lets continue on with the series. Next post in this series will take us back into the thick of it. There is still a huge benefit to using typed datasets, just sad that this bug caused such an unfortunate loss of some of that functionality.
 
Cheers,
 
Robert Porter

 
Categories: .NET | ADO.NET | Programming | SQL | VB.NET | Visual Studio | XML


Craig Nicholson : Visual Studio 2005 Beta 2 won't start workaround.

I recently ran into a problem where Visual Studio 2005 would launch, splash screen would show, then the CPU would peg at 100% and that was that. No IDE, nothing.

After messing around and not getting anywhere I ran into the blog entry above. In short you run the devenv.exe with the parameter /resetuserdata and wait for the devenv process to disappear from the task list.

Voila! Worked! I have my environment back.

Cheers,

Robert Porter


 
Categories: Visual Studio


December 1, 2006
@ 10:24 PM

Does anyone have any real world advice on if Vista is ‘ready’ to be a developer platform? I am still running XP SP2 and my environment is nice and stable. I am reluctant to switch to what is essentially a 1.0 platform.

In particular I am nervous about UAC and related technologies embedded into Vista and their impact on my collection of development tools and utilities.

I have never successfully moved into the LPU (Least Privileged User) camp, even though I know I should, and I understand why UAC has been developed to force the issue.

All this being said, I am writing numerous production applications that are going to have to run on Vista, and I can’t really afford a second machine. I have been toying with the idea of installing Vista on Virtual Machine just for this purpose, but my understanding is that while this is possible, you don’t get the full experience in a VM environment yet.

Anyway, if you have any experience developing using Visual Studio 2005 on Vista I would appreciate any feedback you can send me.

Cheers,

Robert Porter


 
Categories: Programming | Visual Studio


The following post is from Michael Swanson's blog, link below. 

Wow! it's been about 2 1/2 weeks since I last posted, and it seems like forever. In the meantime, I've upgraded my machines to Windows Vista RC2, and I'm not looking back. I had to do some work on my wife's computer the other day, and she's still running Windows XP. Well, not for long. :) Anyway...

Ever since my post about Converting Flash Shapes to WPF, I've been asked about the BitReader class that I mentioned. That class has since been replaced by a much more specialized class called SWFReader. As you can probably tell by the name, it's job is to make it easier to read Adobe/Macromedia Flash (SWF) files and their associated data types. If you're unfamiliar with the contents of a SWF file, you should check out A Concise Guide to the SWF File Format and Alexis' SWF Reference. Both are excellent resources.

To get going, first download my C# sample code: FlashTools.zip (10KB). This Visual Studio 2005 solution contains two projects:

  • The FlashTools project contains four classes: Rect.cs implements the Flash rectangle/RECT type, SWFFile.cs encapsulates logic to open a SWF file and read its contents, SWFReader.cs makes it easy to read common data types from a SWF file, and Tag.cs doesn't do much other than read and identify the various Flash tags.
  • The SWFInfo project is a very simple command-line client that routes tracing information to the console to display SWF header and tag information.

It's important to note that most modern Flash files use ZLIB compression (explained in RFCs 1950, 1951, and 1952). You could certainly implement your own "inflate" logic, but it's already been done by a number of folks. I chose to use the fully managed SharpZipLib. You'll need to download the assembly and add a reference to it from the FlashTools project to successfully compile my sample code.

To examine the contents of a SWF file in detail, the Dump Flash Decompiler is an invaluable tool. SWF Tools is another good one to check out (especially SWFDump). Both of these are useful for validating the data that you're reading from the SWF file.

Last, this is sample code, so swim at your own risk. There's no error checking, unit tests, performance optimizations, or guarantees. If you're going to build a more robust solution, this code will only give you enough guidance to get going. If you have any questions, feel free to contact me directly. Otherwise, party on!

Source: Example C# Code for Reading Flash (SWF) Files
Originally published on Mon, 16 Oct 2006 00:35:38 GMT by mswanson


 
Categories: .NET | Flash


I stumbled on this today, original location is below. - Robert Porter 

SecureString Class

Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed. This class cannot be inherited.

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)

http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx

Source: Use SecureString in .NET 2.0 for Confidential Text
Originally published on Fri, 01 Dec 2006 21:28:00 GMT by Devin A. Rychetnik


 
Categories: .NET | Programming | Visual Studio