Archives for: March 2009

03/29/09

Permalink 05:29:32 pm, by truewill Email , 193 words, 290 views   English (US)
Categories: .NET, Windows, Tools, Conventions, PowerShell

DevConnections report

I was at DevConnections in Orlando last week. It was definitely educational.

The major item of interest was WCF (Windows Communication Foundation). I attended two sessions on it presented by Miguel Castro (who is an excellent presenter) and a post-conference seminar taught by Juval Löwy. Castro stressed that the Visual Studio wizards are the worst way to do WCF, and Löwy emphasized the many benefits that WCF offers over Web Services and traditional OO development. I came away believing that SOA (service-oriented architecture) may actually be feasible.

Microsoft is coming out with a new distributed cache called Velocity. This is primarily for web sites; what I found interesting was that Windows PowerShell is the designated tool for administering Velocity.

Microsoft’s Scott Guthrie made a point of mentioning integration with open source projects (specifically NHibernate and NUnit) in his keynote. Good to hear.

There was a cool demo of installing Silverlight 3 applications locally and running them outside the browser in a sandbox. Interesting, but on the edge of my radar.

WinForms didn’t get much love. Sigh.

Anyway, hi to the all nice people I met! It’s good to be back, though.

03/18/09

Permalink 09:33:05 pm, by truewill Email , 103 words, 328 views   English (US)
Categories: Announcements [A], .NET, Conventions, Security

DevConnections

I’ll be at DevConnections in Orlando next week. If you see me, say hi! (Look for the bald guy with glasses dressed all in black.)

I’ve been working a lot lately - learning a lot, but without much time or energy to post. I’m becoming addicted to Steve Gibson’s Security Now! podcast, too. So far it’s clued me in on Sandboxie, NoScript, and properly disabling Autorun (not as easy as you’d think).

As for reading, I got through the second edition of Framework Design Guidelines and started on Scott Bain’s Emergent Design. So far, Bain is an interesting read.

More after the convention!

03/10/09

Permalink 09:59:53 pm, by truewill Email , 17 words, 296 views   English (US)
Categories: Quality

Manifesto for Software Craftsmanship

03/06/09

Permalink 08:29:43 pm, by truewill Email , 135 words, 221 views   English (US)
Categories: Tips, .NET, Windows, Tools

Visual Studio Toolbox Choose Items crash fix

I’m not a heavy UI guy, but today I was working on a WinForms app and tried to get a custom component to show up in the Toolbox. I right-clicked on the Toolbox, selected Choose Items… from the context menu, and… boom. Visual Studio crashed. I reproduced it, too.

After some searching, I found the solution on Wesley Walraeve’s blog:
Visual Studio 2008 SP1 crashes, Toolbox –> Choose Items…

The culprit was PowerCommands for Visual Studio 2008. Uninstalling that (via Add or Remove Programs) fixed it.

Note that PowerCommands shows up on the Visual Studio splash screen and in About Microsoft Visual Studio, but not in Tools/Add-in Manager.

There’s an alleged fix according to one of the comments on the PowerCommands page, but I’m not willing to risk that at this point. It’s handy, not crucial.

03/02/09

Permalink 07:34:58 pm, by truewill Email , 237 words, 182 views   English (US)
Categories: Tips, .NET, Windows, SQL, Persistence

ADO.NET and the OleDbType

I’m by no means an expert on ADO.NET. Most of the time I go through an O/RM (Gentle.NET) to handle persistent storage. (It’s a nice product, but it’s no longer being maintained.) A recent project needed to read an Access database, and we had built some SQL Server-specific layers on top of Gentle, so I dropped to ADO.NET and used OleDb to hit the Jet drivers.

Everything was working in my tests. When I tried it on a different machine, though, it failed with “Data type mismatch in criteria expression.” The Jet DLLs were the same. The base MDAC version was the same. The relevant schema in the database was the same.

I still don’t know what caused it, but I know how to fix it. I was using DbType to set the type of the SQL parameters. This was not mapping correctly to the OleDbType. For instance, DbType.String was mapping to OleDbType.VarWChar when the actual type was WChar (similarly with date types).

To fix it, I used View/Server Explorer in Visual Studio, connected to the database, then checked the column properties. I copied and pasted the OleDbType values into the code and set OleDbType directly for the parameters. Then I removed the connection in Server Explorer.

Note that this was all hand-coded C# - I was porting working code over from Delphi, and was not using any visual tools.

Development Central

Development Central is the blog of Bill Sorensen, a professional software developer. Much of this will relate to C#, .NET, and OOP in general.

Disclaimer
These postings are provided "AS IS" with no warranties and confer no rights.

Search

Categories

Linkblog

b2evolution

contributors

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 2

powered by b2evolution free blog software