<?xml version='1.0' encoding='windows-1252'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-3309715</id><updated>2007-03-23T10:03:33.843-05:00</updated><title type='text'>Boog's Blog</title><link rel='alternate' type='text/html' href='http://www.myboogpages.com/index.html'></link><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default?start-index=26&amp;max-results=25'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default'></link><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.myboogpages.com/atom.xml'></link><author><name>Graham</name></author><generator version='7.00' uri='http://www2.blogger.com'>Blogger</generator><openSearch:totalResults>239</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry><id>tag:blogger.com,1999:blog-3309715.post-6969089595419002766</id><published>2007-03-23T09:59:00.000-05:00</published><updated>2007-03-23T10:03:34.063-05:00</updated><title type='text'>The Last Goodbye</title><content type='html'>So long, Blogger! My Boog Pages is officially moving to WordPress.  This message is primarily intended for anyone receiving this via syndication.  If you're reading my feed, please update to:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.myboogpages.com/feed/"&gt;http://www.myboogpages.com/feed/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thankyouverymuch.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/03/last-goodbye.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/6969089595419002766'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/6969089595419002766'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-7947669232239655414</id><published>2007-02-22T10:10:00.000-06:00</published><updated>2007-02-22T12:27:52.961-06:00</updated><title type='text'>Pwned (Updated)</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&lt;embed src="'http://youtube.com/v/aA20dKc3kK8'" width="'425'" height="'350'" type="'application/x-shockwave-flash'"&gt;&lt;/embed&gt;&lt;/p&gt;&lt;p&gt;George Takei, actor ("Mr. Sulu") and gay man, responds to Tim Hardaway on the Jimmy Kimmel show.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;  I didn't think about it until I read &lt;a href="http://sportsillustrated.cnn.com/2007/writers/frank_deford/02/21/gay.athletes/index.html"&gt;Frank Deford's article&lt;/a&gt;, but I feel I should point something out in the interests of full disclosure:  Would I feel comfortable having a gay teammate?  Sure, no problem.  Would I feel comfortable sharing a shower with a gay man?  No.  I wish it wasn't so, but there it is.&lt;/p&gt;&lt;/div&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/02/pwned.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/7947669232239655414'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/7947669232239655414'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-4559748165602727953</id><published>2007-02-07T12:19:00.000-06:00</published><updated>2007-02-07T12:32:38.564-06:00</updated><title type='text'>Rocky XLI</title><content type='html'>So I was reading some reactions to the Superbowl over at &lt;a href="http://www.footballoutsiders.com"&gt;Football Outsiders&lt;/a&gt;, and it occurred to me why I always rooted against Peyton Manning: because he's Ivan Drago.&lt;br /&gt;&lt;br /&gt;(Drago, of course, was Rocky's opponent in &lt;em&gt;Rocky IV&lt;/em&gt; (The Undiscovered Comedy), in which Rock ends the Cold War single handed.)&lt;br /&gt;&lt;br /&gt;Drago was prepared with the latest scientific methods and machinery until he looked like he'd been tooled from a piece of steel - surely intended to emphasis his similarity to a robot.  And actor Dolph Lungren had the skills to deliver an equally robotic performance.  Oh, wait...&lt;br /&gt;&lt;br /&gt;But when he got in the ring, and got socked in the face a few times, he wilted.  Which brings us to Peyton Manning.  Manning is known for his fanatical preparation, his desire to keep practicing until he can run every play &lt;em&gt;exactly&lt;/em&gt; right.  The Colts' offense is an exercise in efficiency, methodically picking apart opposing teams and overwhelming them with sheer firepower.&lt;br /&gt;&lt;br /&gt;This emphasis on perfection cuts both ways.  When a big game is on the line, when ill-tempered 300 pound linemen are coming after Manning like a pack of wild dogs, when his receivers have been hit so often they're crying like 9-year-old girls, that perfect execution breaks down, and Manning has not shown an ability to adjust.  When the going gets tough, he goes home.&lt;br /&gt;&lt;br /&gt;Until this year.  I noticed early in this season that something seemed different about the Colts (and, dammit, meant to post about it).  They were winning games in which they played poorly.  They kept coming and never quit, and Manning was a big part of it.  They were finally playing with some heart.&lt;br /&gt;&lt;br /&gt;Then Houston ran them out of the stadium, and I figured they were toast.  Shows what I know about football.&lt;br /&gt;&lt;br /&gt;My point is that people don't like rooting for Ivan Drago, the perfect machine.  We like rooting for Rocky, the underdog who just hangs in there with nothing but guts and determination.  That's what Manning showed this year.  He finally lived up to his billing.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/02/rocky-xli.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/4559748165602727953'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/4559748165602727953'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-7072518583965269329</id><published>2007-02-06T12:28:00.000-06:00</published><updated>2007-02-06T12:28:25.481-06:00</updated><title type='text'>Grand Theft Auto: Nice City</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;&lt;object height='350' width='425'&gt;&lt;param value='http://youtube.com/v/zfhZfSVuup4' name='movie'&gt;&lt;/param&gt;&lt;embed height='350' width='425' type='application/x-shockwave-flash' src='http://youtube.com/v/zfhZfSVuup4'&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;p&gt;Here's the GTA Coke ad from the Super Bowl.  If you have never played GTA: Vice City, the reproduction here is absolutely uncanny - especially as "Tommy Vercetti" drags a guy out of his car.  And gives him a Coke and a smile.&lt;/p&gt;&lt;/div&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/02/grand-theft-auto-nice-city.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/7072518583965269329'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/7072518583965269329'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-6076693328274799902</id><published>2007-02-05T11:13:00.000-06:00</published><updated>2007-02-05T11:29:22.960-06:00</updated><title type='text'>CAPTCHA Gotcha</title><content type='html'>Just read &lt;a href="http://www.hackszine.com/blog/archive/2007/02/negative_captcha.html?CMP=OTC-7G2N43923558"&gt;this story&lt;/a&gt; (via &lt;a href="http://www.digg.com"&gt;Digg&lt;/a&gt;), about a "reverse CAPTCHA". For those of you who don't know, a CAPTCHA is a "Completely Automated Public Turing test to tell Computers and Humans Apart", and is used on many content management systems to prevent spam.  When you post a comment to this blog, the stylized series of letters you have to enter is a CAPTCHA.&lt;br /&gt;&lt;br /&gt;This reminded me of a pretty good short story by Fred Saberhagen, one of his "Beserker" series.  Background: in the far future, a race of automated spaceships is bent on destroying humanity.  In "WHAT DO YOU WANT ME TO DO TO PROVE IM HUMAN STOP", a human cruiser is pursuing two spaceships heading for a large colony.  One of the ships is carrying vital material for the colony's defense; the other is a Beserker.  Blow them both up and the colony will be wide open to attack.  Blow up neither and it will be &lt;em&gt;under&lt;/em&gt; attack.&lt;br /&gt;&lt;br /&gt;There is no audio or video communication, only binary, and the ships are too far away to overhaul and inspect.  One claims to be a high-speed courier, the other a lifeboat from a passenger ship heavily damaged in a Beserker attack.  So, who to trust?&lt;br /&gt;&lt;br /&gt;Saberhagen comes up with a pretty good solution to this problem, based around a simple fact: if machines remember something, they remember it in every detail.  People need hints.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/02/captcha-gotcha.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/6076693328274799902'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/6076693328274799902'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-1550515765020944565</id><published>2007-02-01T15:58:00.000-06:00</published><updated>2007-02-01T16:12:56.155-06:00</updated><title type='text'>DVD Review: THE DRIVER</title><content type='html'>I was really looking forward to &lt;em&gt;The Driver&lt;/em&gt;, by all accounts a tense little crime drama from 1978. The Continental Op and the Nameless Detective are, of course, famous for never being named, but this film one-ups them: &lt;em&gt;nobody&lt;/em&gt; gets a name. Instead we have Ryan O'Neal as The Driver, Bruce Dern as The Detective, and Isabelle Adjani as The Player.&lt;br /&gt;&lt;br /&gt;The story: O'Neal is the best getaway driver in the business. Dern is out to bag him, even if it means bending the law as far as it will bend. And that's pretty much it.&lt;br /&gt;&lt;br /&gt;Like many films from the seventies, &lt;em&gt;The Driver &lt;/em&gt;is told as more through images than dialog, with only Dern getting a chance to ramble on, which he does (let's hope the scenery was fat-free). A good approach for this kind of minimalist noir, which left me with high hopes.&lt;br /&gt;&lt;br /&gt;Too bad the movie sucked.&lt;br /&gt;&lt;br /&gt;First of all, it appears to be heavily influenced by the French film &lt;em&gt;Le Samourai&lt;/em&gt;, in which the main character had a less sympathetic job as a hired killer. Both that character and The Driver live in squalor despite the fact they must be well-paid; both present a blank face to the world; both raise their competence to the level of a virtue. But where Jef in &lt;em&gt;Samourai&lt;/em&gt; eventually showed a little humanity and a little desperation, O'Neal remains the same stony character at the end that he is at the beginning.&lt;br /&gt;&lt;br /&gt;And one scene *totally* rips off &lt;em&gt;The Getaway&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Adjani does nothing but pout her way through this role, showing all the dramatic range of a dishrag, which is strange since she was just spectacular in &lt;em&gt;One Deadly Summer&lt;/em&gt; only a couple of years later. O'Neal never lets us see inside his character; if all his grim, silent staring had been cut, the running time would be fifteen minutes shorter. And there's not really much of a twist at the end.&lt;br /&gt;&lt;br /&gt;Only Dern and Ronnee Blakely (in a small part as O'Neal's booking agent) really do anything on screen.&lt;br /&gt;&lt;br /&gt;So, sadly, I can't recommend this movie. See &lt;em&gt;Le Samourai&lt;/em&gt; instead. Or read &lt;em&gt;The Wheelman&lt;/em&gt;.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/02/dvd-review-driver.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/1550515765020944565'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/1550515765020944565'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116949019252168504</id><published>2007-01-22T12:10:00.000-06:00</published><updated>2007-01-22T12:23:12.553-06:00</updated><title type='text'>Demons, Exorcised</title><content type='html'>Colts 38, Patriots 34 - HOLY CRAP what a great game that was!  That's the best AFC Championship I've seen since the Steelers beat the Patriots ten years ago, a game that also came down to the last minute (a Colts receiver dropped a game-winning Hail Mary).&lt;br /&gt;&lt;br /&gt;When Asante Samuel returned an interception for a touchdown in the second quarter, the Colts were down 21-3.  From that point on, they outscored the Patriots 35-13.  Tom Brady played pretty well, but Manning was great.  Looks like he's finally grown a pair.&lt;br /&gt;&lt;br /&gt;Although I thought that New England would win, I suspected that this Colts team was different from those of the past few years.  Sure, they raced out to a 9-0 record, but they were struggling, winning ugly and winning late.  That early adversity toughened them up, and proved to them that they could perform when things weren't perfect.&lt;br /&gt;&lt;br /&gt;Their victory over Baltimore last week only solidified that feeling.  They won a game against a tough team without scoring a touchdown, and with Peyton Manning having a subpar day.&lt;br /&gt;&lt;br /&gt;Against the Patriots, they won despite the performance of wideouts Marvin Harrison and Reggie Wayne.  New England's secondary pretty much took them out of the game with a spectacular display of one-on-one coverage.  Instead it was Dallas Clark and Dominic Rhodes who led the way with big plays down the stretch.&lt;br /&gt;&lt;br /&gt;And Manning.  Under heavy pressure, behind for most of the game, with Tom Brady standing on the other sideline, Manning resisted the temptation to go deep, to take the big risk, to end the game one way or another.  Instead he moved his team steadily down the field, and scored, and scored, and scored.  32 points in the last 30 minutes.&lt;br /&gt;&lt;br /&gt;As I said, Brady had a good game, and this is the first time his Patriots teams have just been flat beat.  I give him a mulligan for last year's defeat at the Broncos - he had an injured shoulder and obviously wasn't right.  This time he got his opportunities, but in the end he couldn't match Manning.&lt;br /&gt;&lt;br /&gt;I was rooting for the Patriots throughout, but I have to say I was smiling at the end of the game.  Manning and coach Tony Dungy finally answered their critics in the only way that mattered - on the field.  Good luck to them.&lt;br /&gt;&lt;br /&gt;In the early game, the Saints choked.  And that's all I have to say about that.&lt;br /&gt;&lt;br /&gt;Also, the Cowboys will be looking for a new head coach next year now that Parcells has decided to retire.  Too bad that Mike Zimmer already took that job in Atlanta, he'd be a good choice.  Hopefully we'll get someone like Russ Grimm, late of Pittsburg.  I heard weeks ago that either Terrell Owens would go, or Parcells would, and it looks like that's the case.  Another season of intrigue for the 'Boys.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/01/demons-exorcised.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116949019252168504'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116949019252168504'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116852814909468556</id><published>2007-01-11T09:05:00.000-06:00</published><updated>2007-01-11T09:09:09.113-06:00</updated><title type='text'>The Wisdom Of Dilbert</title><content type='html'>Scott Adams &lt;a href="http://dilbertblog.typepad.com/the_dilbert_blog/2007/01/answers_to_your.html"&gt;answers some reader questions&lt;/a&gt; on his blog.  I found this most interesting:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Q. How do you ensure that the material you publish stays fresh and funny enough to be continually published? &lt;br /&gt;&lt;br /&gt;A. I write what interests and amuses me and hope for the best.&lt;/blockquote&gt;&lt;br /&gt;Good advice for any writer.  Obviously I am not constrained by the necessity to make a living from what I write, but I suspect that very few writers make money with stuff they aren't engaged with.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/01/wisdom-of-dilbert.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116852814909468556'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116852814909468556'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116801908505644484</id><published>2007-01-05T11:43:00.000-06:00</published><updated>2007-01-05T11:44:45.056-06:00</updated><title type='text'>The Conversation</title><content type='html'>"The is no 'I' in 'team'." - &lt;i&gt;author unknown&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;"There is no 'I' in 'team', but there is in 'win'." - &lt;i&gt;Michael Jordan&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;"There's also an 'I' in 'stupid'." - &lt;i&gt;co-worker Spencer&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;"And there's two of them in 'dipshit'." - &lt;i&gt;me&lt;/i&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/01/conversation.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116801908505644484'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116801908505644484'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116801896936735436</id><published>2007-01-05T11:42:00.000-06:00</published><updated>2007-01-05T11:42:49.386-06:00</updated><title type='text'>Sin</title><content type='html'>Nothing in this world tastes as sweet as sucking down that first Dr Pepper after a trip to the dentist.</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2007/01/sin.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116801896936735436'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116801896936735436'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116620818323729202</id><published>2006-12-15T12:40:00.000-06:00</published><updated>2006-12-15T12:44:37.856-06:00</updated><title type='text'>Friday Motivator</title><content type='html'>&lt;img src="http://www.myboogpages.com/Images/SwedishChefSmall.jpg" width="450" height="563"/&gt;&lt;br /&gt;&lt;br /&gt;Made with &lt;a href="http://bighugelabs.com/flickr/motivator.php"&gt;Motivator&lt;/a&gt;.  Bork you very much.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/swedish+chef" rel="tag"&gt;Swedish Chef&lt;/a&gt;, &lt;a href="http://technorati.com/tag/motivators" rel="tag"&gt;Motivators&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/friday-motivator.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116620818323729202'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116620818323729202'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116603864806775755</id><published>2006-12-13T13:32:00.000-06:00</published><updated>2006-12-13T13:37:28.070-06:00</updated><title type='text'>The Season of Giving</title><content type='html'>Just thought I'd pass along a link to &lt;a href="http://donate.wvus.org/OA_HTML/xxwvibeCCtpSctDspRte.jsp?lid=topnav_giftcat&amp;lpos=topnav&amp;section=10024"&gt;World Vision's Gift Catalog&lt;/a&gt; (via &lt;a href="http://www.fark.com"&gt;FARK&lt;/a&gt;).  Here you can donate various goods to impoverished areas in Africa, and it's as easy as ordering from Amazon.com.&lt;br /&gt;&lt;br /&gt;I gave a share of a well, because clean water is one of the biggest problems in the developing world.  It sounds silly, but many children in the developing world die from chronic diahrrea, usually caused by contaminated drinking water.&lt;br /&gt;&lt;br /&gt;I also gave a share of a bull.  Like there's not enough bullshit in the world.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/charity" rel="tag"&gt;Charity&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/season-of-giving.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116603864806775755'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116603864806775755'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116490128936066348</id><published>2006-11-30T09:22:00.000-06:00</published><updated>2006-12-13T13:28:04.430-06:00</updated><title type='text'>Creating Objects from XML with .Net Deserialization - Updated</title><content type='html'>When I first started writing the back-end code for &lt;a href="http://www.crimespot.net"&gt;CrimeSpot.net&lt;/a&gt;, I was confronted with a dilemma: I had to import two different versions of Atom and three of RSS, all of which had slightly different formats.  I had two options.  I could create a separate routine within the program to import each of these formats, or I could transform each of them to a single format using XSL templates.&lt;br /&gt;&lt;br /&gt;I decided to use templates and import a single, common XML format.  Originally, I chose to do this because it made it very simple to separate program and data.  Combining the two is one of my biggest pet peeves.  By doing it this way, I could just create an entry in the database for each input type and include an XSL file to change it to the common form.&lt;br /&gt;&lt;br /&gt;Subsequent events have shown this to be a wise decision.&lt;br /&gt;&lt;br /&gt;Why?  Well, I have been fooling around with one of the features of the .NET framework - the ability to take objects within programs and "serialize" them to XML files.  Normally this is used so that you can retain the object's value between instances of the program.  If you need that object back at a later time, you can "deserialize" that XML file back into an object.&lt;br /&gt;&lt;br /&gt;But when you're deserializing, there's no reason that the XML must come from an object that was previously serialized.  You can use any XML file that matches the object's format.  With a little work, you can even import a collection of objects.&lt;br /&gt;&lt;br /&gt;This helps me tremendously because the objects I will be importing need some processing before they can be saved.  In particular, I need to inspect a date/time field and capture the offset from Universal time (UTC, aka GMT).  This information is lost when the date is created &lt;i&gt;as a date&lt;/i&gt;, so I need to get it when the date is still just text.&lt;br /&gt;&lt;br /&gt;And .NET supports saving XML directly into a database (via the DataSet object), so when I'm done, I can just serialize the object and save the resulting XML.  This approach may have performance issues, but it's simple and elegant, and I can always buy a faster computer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt;  Here's a little source code to show how this works.  This code will read XML from a DataSet and import it into a collection of objects.  First, the object classes:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Public Class SourceTypes&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Private TypeList As New SourceTypeList&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;System.Xml.Serialization.XmlElementAttribute("SourceType", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public Property Types() As SourceTypeList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Return Me.TypeList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Get&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set(ByVal TypeList As SourceTypeList)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me.TypeList = TypeList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Set&lt;br /&gt;&amp;nbsp;&amp;nbsp;End Property&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public Sub New()&lt;br /&gt;&amp;nbsp;&amp;nbsp;End Sub&lt;br /&gt;&lt;br /&gt;End Class&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This class is a serialization wrapper.  It exists only to provide a convenient XML representation of the collection of SourceType objects.  For information on the SourceTypeList class, please see &lt;a href="http://www.myboogpages.com/2006/12/net-dictionary-serialization-problem.html"&gt;this post&lt;/a&gt;.  Incidentally, the XmlElementAttribute causes the list not to have an XML element of its own; instead it presents the list items directly below the root element.&lt;br /&gt;&lt;br /&gt;Here is the SourceType class:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Public Class SourceType&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public SourceTypeID As New Long&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public Name As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public Description As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public ItemField As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public UpdateField As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public UpdateCheckRX As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public UpdateSelectRX As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public UpdateReplaceRX As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;Private TemplateString As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;System.Xml.Serialization.XmlIgnore()&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;Public TemplateTransform As New XslCompiledTransform&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;End Class&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;I have simplified the class a bit.  It had a property that accepted an XSL string and used it to initialize the TemplateTransform field.  I can't emphasize enough how helpful properties are when using serialization.  It makes it easy to do some processing without having to explicity invoke any methods. Here, the XmlIgnore attribute prevents that field from participating in serialization.&lt;br /&gt;&lt;br /&gt;Now here's the guts of the program, where we instanciate the class from the DataSet (which we will assume has already been filled):&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Dim TypeList As SourceTypes&lt;br /&gt;Dim TypeSerializer As New XmlSerializer(GetType(SourceTypes))&lt;br /&gt;Dim TypeReader As StringReader&lt;br /&gt;&lt;br /&gt;TypeReader = New StringReader(TypeSet.GetXml)&lt;br /&gt;TypeList = CType(TypeSerializer.Deserialize(TypeReader), SourceTypes)&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;It may be more efficient to use DataSet.WriteXML and an XML reader here, I haven't tested it.  The result is an object that contains a collection of SourceType objects.&lt;br /&gt;&lt;br /&gt;As always, please drop a note in the contents if this helps.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/.net" rel="tag"&gt;.NET&lt;/a&gt;, &lt;a href="http://technorati.com/tag/programming" rel="tag"&gt;Programming&lt;/a&gt;, &lt;a href="http://technorati.com/tag/xml" rel="tag"&gt;XML&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/11/creating-objects-from-xml-with-net.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116490128936066348'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116490128936066348'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116603691107422026</id><published>2006-12-13T12:51:00.000-06:00</published><updated>2006-12-13T13:08:31.093-06:00</updated><title type='text'>The .NET Dictionary Serialization problem, solved by KeyedCollection</title><content type='html'>When I posted a while back about &lt;a href="http://www.myboogpages.com/2006/11/creating-objects-from-xml-with-net.html"&gt;importing XML documents as objects using serialization&lt;/a&gt;, one of the purposes I wanted to put this to was creating a list of objects that could be selected by a unique key value.  For example, if you had a list of books, you could pick out the one you wanted by specifiying its ISBN.&lt;br /&gt;&lt;br /&gt;In .NET, this kind of lookup is handled by a type of collection called a &lt;i&gt;dictionary&lt;/i&gt;.  You give it a key and a value, and Presto! You can sort it, look up specific items, etc.&lt;br /&gt;&lt;br /&gt;One problem: dictionaries don't support serialization.&lt;br /&gt;&lt;br /&gt;I spent a while banging my head against this brick wall before I found a convenient way around it: a .NET class called &lt;a href="http://msdn2.microsoft.com/en-us/library/ms132438.aspx"&gt;KeyedCollection&lt;/a&gt;.  KeyedCollection derives from the iList interface instead of iDictionary, and is therefore serializable, but also allows you to specify a key.  This class is an abstract type, so you must derive your own custom class, but as we'll see in a second, that's a snap.&lt;br /&gt;&lt;br /&gt;KeyedCollection must be inherited because it has to be a list of a specific object type.  Then, instead of specifying your own key value for each item in the list, you indicate which of the object's fields you want to be used as the key.  Here is a class I created this morning:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Public Class SourceTypeList&lt;br /&gt;&amp;nbsp;&amp;nbsp;Inherits System.Collections.ObjectModel.KeyedCollection(Of Long, SourceType)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Protected Overrides Function GetKeyForItem(ByVal item As SourceType) As Long&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Return item.SourceTypeID&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Function&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sub New()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MyBase.New()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Sub&lt;br /&gt;End Class&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;What does this code do?  It tells Visual Basic to create a new type collection derived from KeyedCollection, where the key is a long integer and the value is an object of type SourceType (SourceType represents information about a type of syndication file, such as Atom 0.3 or RSS 2.0).  You then overried the function GetKeyForItem and tell VB which field you want to use as the key.&lt;br /&gt;&lt;br /&gt;And it works beautifully.  I had tested deserialization using a generic List(Of T) and I was able to swap out the code in maybe 5 minutes.&lt;br /&gt;&lt;br /&gt;So if you need a keyed list and your objects include unique values, you can use KeyedCollection and get the benefits of serialization as well.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags:  &lt;a href="http://technorati.com/tag/programming" rel="tag"&gt;Programming&lt;/a&gt;, &lt;a href="http://technorati.com/tag/.net" rel="tag"&gt;.NET&lt;/a&gt;, &lt;a href="http://technorati.com/tag/XML" rel="tag"&gt;XML&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/net-dictionary-serialization-problem.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116603691107422026'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116603691107422026'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116570029775959966</id><published>2006-12-09T15:38:00.000-06:00</published><updated>2006-12-09T15:38:48.563-06:00</updated><title type='text'>In Praise of Moonbattery</title><content type='html'>Way back on 9/11 I was going to put up a post denouncing those who thought that the attacks on the World Trade Center and the Pentagon were faked.  I still beleive that many of these people either have a deep-seated need to blame nebulous conspiracies instead of a few highly motivated individuals, but I also realized that single-mindedness to the point of mania has its uses.&lt;br /&gt;&lt;br /&gt;Around that same time I ran across an article by Malcolm Gladwell entitled "&lt;a href="http://www.gladwell.com/2001/2001_07_02_a_ddt.htm"&gt;The Mosquito Killer&lt;/a&gt;."  The subject was Fred Soper, a public health official with the Rockefeller Foundation (among other organizations).  Soper had a goal: wiping out malaria.  And he pursued this goal to the point of lunacy.&lt;br /&gt;&lt;br /&gt;As the article points out, malaria was a huge scourge back in the 1940s when Soper began his crusade.  It was still common not just in the tropics but in the American south.  Hundreds of thousands died from it every year.  When Soper was handed a new insecticide called DDT, he decided to do something about it.&lt;br /&gt;&lt;br /&gt;Read the article for more information, but suffice to say that A) Soper was ultimately unsuccessful, and B) he nevertheless saved tens of millions of lives (a conservative estimate).&lt;br /&gt;&lt;br /&gt;It's surprising to me that people like Soper and &lt;a href="http://nobelprize.org/nobel_prizes/peace/laureates/1970/borlaug-bio.html"&gt;Norman Borlaug&lt;/a&gt; (who saved hundreds of millions through the development of new strains of grain and intensive farming techniques) aren't better known.  Even Jonas Salk, famous for wiping out polio, is not as well known as he once was.&lt;br /&gt;&lt;br /&gt;Worse, it seems that there's a strong reluctance to meddle in the natural world these days.  It's true that there are unintended side effects to any "solution", but millions die every year from ailments as treatable as diarrhea.  The world was a much different place just a hundred years ago, for everyone, everywhere, and the fact that people live longer and most never face a debilitating disease is taken for granted now, thanks to people like Soper, Borlaug, and Salk, and their insane refusal to take no for an answer.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/progress" rel="tag"&gt;Progress&lt;/a&gt;, &lt;a href="http://technorati.com/tag/unsung+heroes" rel="tag"&gt;Unsung Heroes&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/in-praise-of-moonbattery_09.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116570029775959966'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116570029775959966'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116550978216130993</id><published>2006-12-07T10:24:00.000-06:00</published><updated>2006-12-07T13:03:44.100-06:00</updated><title type='text'>A Truly Sad Day</title><content type='html'>I found out some sad news late last night - Greg Page, the Yellow Wiggle, is turning in his yellow shirt and &lt;a href="http://www.thewiggles.com.au/us/mediacentre/news/31"&gt;retiring from the band&lt;/a&gt; due to health problems.  It's really surprising because he's the youngest member at 34 - bandmate Jeff Fatt is over 50.&lt;br /&gt;&lt;br /&gt;For a while my youngest son never missed an episode of The Wiggles, and they grew on me as well.  Greg formed the band with Murray Cook and Anthony Field when the three of them met while studying to be teachers.  The three then formed The Wiggles, later inviting Anthony's old bandmate Jeff from The Cockroaches to join.&lt;br /&gt;&lt;br /&gt;While some of their music is less than memorable, a lot of it is not bad at all, and even adults can enjoy songs like "Wiggle Groove" and "Sailing Around The World" - some adults, anyway.  And kids LOVE them, and they love kids.  They've earned every dollar they have made for that alone.&lt;br /&gt;&lt;br /&gt;Greg apparently started having health over the past couple of years, including dizziness and nausea, and was finally dignosed with orthostatic intolerance, in which the nervous system does not make the necessary changes to compensate for changes in activity (even just standing up) or environment (entering a warm room).&lt;br /&gt;&lt;br /&gt;So best of luck to Greg and the other Wiggles, and here's hoping they keep on keeping kids happy.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Other musical news:&lt;/b&gt; I was out shopping with the wife the other day when she picked up a DVD of Schoolhouse Rock and jokingly suggested we get it.  So we did.  And that thing ROCKS!  I can still remember a lot of these, although I don't think I ever saw "Lolly Lolly Lolly" or "Interplanet Janet", but of course I remember "I'm Just A Bill" and "Conjunction Junction".  And I can still recite every word of the Preamble to the Constitution thanks to the Schoolhouse Rock song.&lt;br /&gt;&lt;br /&gt;My favorite, though, is "Interjections!" ("Hurray! I'm for the other team!") which steals shamelessly from Handel's Hallelujah Chorus, i.e. "IN-TER-JEC-TIONS!".  And I have to beleive there's an uncensored version somewhere in which they use somewhat stronger interjections.&lt;br /&gt;&lt;br /&gt;Reading this over, I can see that I'm not getting across just how damn cool this sounds, so go &lt;a href="http://www.amazon.com/Best-Schoolhouse-Rock-Various-Artists/dp/B00000DGSW/sr=8-2/qid=1165509547/ref=pd_bbs_sr_2/102-6128794-3688921?ie=UTF8&amp;s=music"&gt;here&lt;/a&gt; and listen to some of the samples (or check out the &lt;a href="http://www.amazon.com/Schoolhouse-Rock-Rocks-Various-Artists/dp/B000005J80/sr=8-3/qid=1165509612/ref=pd_bbs_sr_3/102-6128794-3688921?ie=UTF8&amp;s=music"&gt;disc of all-star remakes&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;It's sad to me sometimes that today's generation of kids won't grow up hearing this on Saturday mornings between Bugs Bunny cartoons.  Childhood ain't what it used to be.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/music" rel="tag"&gt;Music&lt;/a&gt;, &lt;a href="http://technorati.com/tag/kids" rel="tag"&gt;Kids&lt;/a&gt;, &lt;a href="http://technorati.com/tag/nostalgia" rel="tag"&gt;Nostalgia&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/truly-sad-day.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116550978216130993'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116550978216130993'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116534562357726516</id><published>2006-12-05T12:49:00.000-06:00</published><updated>2006-12-05T13:07:03.616-06:00</updated><title type='text'>Programming Efficiency, Elegance, and Performance</title><content type='html'>In &lt;a href="http://www.myboogpages.com/2006/11/creating-objects-from-xml-with-net.html"&gt;my post the other day&lt;/a&gt; on importing XML as .NET objects, I alluded to my philosophy on programming elegance and performance without ever really going into it.&lt;br /&gt;&lt;br /&gt;When writing a program, I always choose efficiency and elegance over performance.  To me, efficiency means completing a task in the fewest steps possible, not always in the quickest way, whereas elegance usually means finding a clever solution that also seems completely obvious when you see it.&lt;br /&gt;&lt;br /&gt;But code that is efficient and/or excellent does not always perform well.  It's very simple to convert an object to XML using serialization, then load that XML into a DataSet, but there's a lot going on under the hood, and those extra steps in the background may cause this to take more time to run than simple BFI.&lt;br /&gt;&lt;br /&gt;In these cases I always rely on the "Let Bill do it!" technique.  Put simply, I rely on the developers of Visual Basic and the .NET framework to be smarter and more experienced than I am, and &lt;i&gt;especially&lt;/i&gt; better at squeezing a few more ounces of performance from their code.&lt;br /&gt;&lt;br /&gt;(Yeah, I use Visual Basic, and have for years.  With most of the work shifted to .NET, I don't think this is much of a bottleneck anymore.)&lt;br /&gt;&lt;br /&gt;So whenever I can, I go for the simplest method and let Microsoft do the work.  It makes my code easier to read and maintain without much of a performance hit.  And I let Moore's Law inflate away whatever hit there is.  After all, you can always buy a faster processor tomorrow.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/programming" rel="tag"&gt;Programming&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/programming-efficiency-elegance-and.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116534562357726516'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116534562357726516'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-116499028403521267</id><published>2006-12-01T10:11:00.000-06:00</published><updated>2006-12-01T10:25:03.833-06:00</updated><title type='text'>Ice Ice Baby</title><content type='html'>So this week we had an outbreak of severe weather down here in Dallas.  A cold front rolled in at about five o'clock on Wednesday, just as I was leaving work, and I have to say it looked pretty damn impressive, with sooty black clouds blotting out the sun in just 15 minutes our so, and the temperatures dropping a good ten degrees in the hour it took to get home.&lt;br /&gt;&lt;br /&gt;On Thursday I got up at the normal time and headed in to work.  It quickly became apparent that half the workforce decided it was too dangerous to drive that day, and the other half made sure to be extra careful by driving 60 miles per hour &lt;i&gt;in the fast lane!&lt;/i&gt;  What the hell is wrong with these people?  It was over seventy degrees on Wednesday, no way the ground was going to freeze.  I didn't see enough ice on my 40 mile commute to make a glass of tea.&lt;br /&gt;&lt;br /&gt;For some reason people down here have an irrational fear of water in its solid form.  When people see a white patch on the road they're like (cue Jessica Rabbit voice), "Oh my God it's ICE!!"  If they don't see any, they're like, "Oh my God it's... BLACK ICE!!!"&lt;br /&gt;&lt;br /&gt;So work was slow yesterday.  When some sleet and snow started to fall around lunchtime my boss came around to say that the person on call (me) would need to stay at a local hotel.  "But you know it's not going to freeze!" I said.&lt;br /&gt;&lt;br /&gt;"Yeah," he replied, "but if you get a call and can't make it in, you're in trouble."&lt;br /&gt;&lt;br /&gt;I'd been tipped off that this might happen and had an overnight bag in the car, so I sucked it up and stayed.&lt;br /&gt;&lt;br /&gt;When I came out this morning, it was forty.  No ice to be seen.  Only... BLACK ICE!!!&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/frustrations" rel="tag"&gt;Frustrations&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/12/ice-ice-baby.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116499028403521267'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/116499028403521267'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115081663146938948</id><published>2006-06-20T10:16:00.000-05:00</published><updated>2006-11-30T13:01:37.113-06:00</updated><title type='text'>INSERTing records into Access using ASP.NET's FormView control</title><content type='html'>Off and on for the past couple of weeks I've been using Microsoft's free &lt;a href="http://msdn.microsoft.com/vstudio/express/vwd/"&gt;Visual Web Developer 2005 Express&lt;/a&gt; to redesign a little Access database-driven website at work.  I had hoped to make it simpler and easier to maintain, by using standard components instead of the custom code I had been using.&lt;br /&gt;&lt;br /&gt;It turned out to be a little more complicated than I had thought.  In particular I discovered a big problem with Access autoincrement fields.  An autoincrement field is a long (32-bit) integer that is automatically assigned a unique ID when a new record is inserted.  But when you are inserting records with ASP.NET, there's no good way to retrieve this value.&lt;br /&gt;&lt;br /&gt;This is not as much of a problem with SQL Server, because you can create stored procedures, or even simple queries, that carry out both INSERT and SELECT statements - that is, they send and receive data in one operation.  Access doesn't do this.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Background.&lt;/b&gt; In ASP.NET 2.0, there's a free-form data bound container called a FormView.  This is similar to the GridView and DetailsView objects, but it is more flexible, as you are not limited in how you can lay out the controls within it (text boxes, drop-down boxes, etc.).&lt;br /&gt;&lt;br /&gt;Each FormView contains templates for different views, such as an Item view (read-only), and ItemEdit view (updates existing records), and an ItemInsert view (just what it says).  Each template contains markup defining the data fields and their layouts.&lt;br /&gt;&lt;br /&gt;In my case, this FormView is connected to a control called an AccessDatasource control.  This datasource has the location of the data file and SQL statements for the SELECT, UPDATE, INSERT, and DELETE procedures.  This control also has &lt;i&gt;events&lt;/i&gt; that are triggered during these procedures, which will become important when we get to the code.&lt;br /&gt;&lt;br /&gt;Now, most ASP.NET pages only post data back to themselves, but I am using separate pages for viewing data and for editing it, and I'm using a standard HTML input field to pass the ID between them.  This is called "cross-posting" in ASP.NET, and I'm sure it's a terrible idea and an example of my inexperience and general cluelessness, but I have good reasons for doing it that way.&lt;br /&gt;&lt;br /&gt;To handle this, my Page_Load event handler contains the following code (all examples in VB):&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Dim IDParam As New Parameter&lt;br /&gt;&lt;br /&gt;If Not IsPostBack Then&lt;br /&gt;&amp;nbsp;If String.IsNullOrEmpty(Request.Form("ID")) Then&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;ServerFormView.ChangeMode(FormViewMode.Insert)&lt;br /&gt;&amp;nbsp;Else&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;IDParam = ServerDatasource.SelectParameters.Item("ID")&lt;br /&gt;&amp;nbsp;&amp;nbsp;IDParam.DefaultValue = Request.Form("ID")&lt;br /&gt;&amp;nbsp;End If&lt;br /&gt;End If&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This FormView control is set to default to Edit mode.  The first line basically says that if no ID form field is suppled, put the FormView control in Insert mode.  If a parameter &lt;i&gt;is&lt;/i&gt; supplied, it's added to the data source.  I could have used a FormParameter in the data source definition, but I want to be able to filter in other situations, as we'll see in a minute.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSERTing records.&lt;/b&gt;  So let's assume we are now in Insert mode.  We fill in all the fields and click an Insert button to add the new record to the database.  What happens next?&lt;br /&gt;&lt;br /&gt;Among other things, the AccessDatasource_Inserting event fires.  This event is raised once an INSERT procedure has started, but before the record is actually inserted.  Here's the code to handle this event - note that "e" is the event arguments passed to this procedure automatically:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Dim InsertCommand As DbCommand&lt;br /&gt;Dim InsertConnection As DbConnection&lt;br /&gt;Dim InsertTransaction As DbTransaction&lt;br /&gt;&lt;br /&gt;InsertCommand = e.Command&lt;br /&gt;InsertConnection = InsertCommand.Connection&lt;br /&gt;&lt;br /&gt;InsertConnection.Open()&lt;br /&gt;&lt;br /&gt;InsertTransaction = InsertConnection.BeginTransaction&lt;br /&gt;&lt;br /&gt;InsertCommand.Transaction = InsertTransaction&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;All we're really doing here is starting a transaction.  Although my testing indicates that this may not always be required, using transactions guarantees that the data source won't be polluted by other database operations during this insert.&lt;br /&gt;&lt;br /&gt;After this event completes, the record is inserted and the AccessDatasource_Inserted event fires.  This is where the work gets done:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Dim InsertCommand As DbCommand&lt;br /&gt;Dim InsertTransaction As DbTransaction&lt;br /&gt;Dim ID As Int32&lt;br /&gt;Dim IDParam As New Parameter&lt;br /&gt;&lt;br /&gt;InsertCommand = e.Command&lt;br /&gt;InsertTransaction = InsertCommand.Transaction&lt;br /&gt;&lt;br /&gt;InsertCommand.CommandText = "SELECT @@IDENTITY AS [ID]"&lt;br /&gt;ID = InsertCommand.ExecuteScalar()&lt;br /&gt;&lt;br /&gt;InsertTransaction.Commit()&lt;br /&gt;&lt;br /&gt;IDParam = ServerDatasource.SelectParameters.Item("ID")&lt;br /&gt;IDParam.DefaultValue = ID&lt;br /&gt;&lt;br /&gt;ServerFormView.ChangeMode(FormViewMode.Edit)&lt;br /&gt;ServerDatasource.DataBind()&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;So, what are we doing here?  First, we're grabbing the INSERT command and the transaction we set in the Inserting event handler.  Then we're reusing the command to run a SELECT statement that retrieves the @@IDENTITY (autoincrement) value for the last record inserted.  Once that is complete, we commit the transaction.&lt;br /&gt;&lt;br /&gt;Next we set the same parameter that we used in the Page_Load procedure to the value of the new row.  We no longer want to be in Insert mode, so we change the FormView's mode to Edit.  Lastly, we refresh the data using the DataBind command.&lt;br /&gt;&lt;br /&gt;And that's all there is to it.  Just make sure that the FormView's ItemEdit template has a form field named "ID" that is bound to the data source's "ID" field, and you are good to go.&lt;br /&gt;&lt;br /&gt;If you're code objects to manipulate Access data, you will run into a similar problem.  You can handle it by &lt;a href="http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B815629"&gt;handling the DataAdapter's RowUpdated event&lt;/a&gt;.  It's similar to the procedure above.&lt;br /&gt;&lt;br /&gt;If you get this to work for you, please leave a note in the comments so I can see if anyone's actually using this code.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/.net" rel="tag"&gt;.NET&lt;/a&gt;, &lt;a href="http://technorati.com/tag/programming" rel="tag"&gt;Programming&lt;/a&gt;, &lt;a href="http://technorati.com/tag/database" rel="tag"&gt;Database&lt;/a&gt;, &lt;a href="http://technorati.com/tag/visual+web+developer+2005" rel="tag"&gt;Visual Web Developer 2005&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/06/inserting-records-into-access-using.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115081663146938948'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115081663146938948'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115802701632710764</id><published>2006-09-11T21:08:00.000-05:00</published><updated>2006-11-30T12:59:49.273-06:00</updated><title type='text'>9/11</title><content type='html'>Go read "&lt;a href="http://www.thrillingdetective.com/fiction/02_10_01.html"&gt;Closure&lt;/a&gt;".  What else is left to say?&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/911" rel="tag"&gt;9/11&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/09/911.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115802701632710764'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115802701632710764'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115091143442445232</id><published>2006-06-21T12:16:00.000-05:00</published><updated>2006-11-30T12:59:17.406-06:00</updated><title type='text'>Burning Sensation</title><content type='html'>After yesterday's tech-fest, I thought today I'd talk about a book I finished up over the weekend: Scott Wolven's collection of stories, &lt;i&gt;Controlled Burn&lt;/i&gt;.  I'd read a few of these stories when they appeared online - "Atomic Supernove", for example, and "The Copper Kings" - so I knew this would be a good book, and I wasn't disappointed.&lt;br /&gt;&lt;br /&gt;Although subtitled "Stories of Prison, Crime, and Men", some of the stories aren't crime stories at all, and others only incidentally.  They are really little slices of life.  Wolven's very patient with his plots - they tend to amble along - and there's rarely a big payoff at the end.  He writes about a permanent underclass who works hard but never gets ahead, men with dangerous jobs and difficult lives.&lt;br /&gt;&lt;br /&gt;One thing that struck me about these stories is the sweep of time they encompass.  In each we get the feeling that we're reading only a chapter in a life.  Most of those lives are bleak, unfolding like a road leading arrow-straight to the grave. There's nowhere to turn onto a different path, and the only stops are liquor stores.&lt;br /&gt;&lt;br /&gt;Wolven doesn't seem interested in being hardboiled, but there is violence here, done by men who really don't care what happens to them.  By comparison, I have a story coming out later this year in which the main character is a bartender and bouncer.  He gets punched by a college kid, loses his temper, and tosses the kid bodily from the bar.&lt;br /&gt;&lt;br /&gt;In Wolven's world, that kid would have ended up with cracked ribs and broken teeth.  But I write from a middle-class perspective, and the character is a "fallen" middle-class kid himself.&lt;br /&gt;&lt;br /&gt;(That's not to say that Wolven is working-class himself - I don't really know anything about him.  But I think it's fair to say that he writes from a working-class perspective.)&lt;br /&gt;&lt;br /&gt;I bought the book at the local Half Price books, which means A) there's someone else in Fort Worth that likes Scott Wolven, and B) it cost him a sale.  Tell you what, Scott, if we ever meet I'll just give you a fiver, and we'll both come out ahead.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mavericks update.&lt;/b&gt;  I had a dream, and now that dream is gone from me.  The Miami Heat finished off the Mavericks last night, winning the series thanks to the contributions of their three key players:  &lt;a href="http://en.wikipedia.org/wiki/Joe_Crawford"&gt;Joe Crawford&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Dick_Bavetta"&gt;Dick Bavetta&lt;/a&gt;, and &lt;a href="http://www.nypost.com/sports/63223.htm"&gt;Bennett Salvatore&lt;/a&gt;.  If I say more, the league office will fine me $250,000, so I'll shut up now.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/books" rel="tag"&gt;Books&lt;/a&gt;, &lt;a href="http://technorati.com/tag/short+stories" rel="tag"&gt;Short Stories&lt;/a&gt;, &lt;a href="http://technorati.com/tag/mystery" rel="tag"&gt;Mystery&lt;/a&gt;, &lt;a href="http://technorati.com/tag/basketball" rel="tag"&gt;Basketball&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/06/burning-sensation.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115091143442445232'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115091143442445232'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115142808122832843</id><published>2006-06-27T12:05:00.000-05:00</published><updated>2006-11-30T12:57:18.710-06:00</updated><title type='text'>Topolicious - UPDATED</title><content type='html'>&lt;a href="http://www.myboogpages.com/Images/Topol.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://www.myboogpages.com/Images/Topol.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Random trivia quiz for the day:  Israeli actor Chaim Topol (better known as just Topol) was in several popular movies from the early 70s to the early 80s.  Name three.  The rules:  1) I decide what "popular" means. 2) No using IMDB.com.  3) If no one gets it by tomorrow I'll put up a picture and you can have another go.&lt;br /&gt;&lt;br /&gt;UPDATE: Only one guess, so I've added a photo as a hint.  This practically gives you one of the movies.  Come on, people!&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/movies" rel="tag"&gt;Movies&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/06/topolicious-updated.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115142808122832843'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115142808122832843'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115177157148339073</id><published>2006-07-01T11:17:00.000-05:00</published><updated>2006-11-30T12:56:23.573-06:00</updated><title type='text'>All The Cool Kids Are Doing It, And So Is Dave White</title><content type='html'>A new meme:&lt;br /&gt;&lt;br /&gt;1. Have you ever been searched by the cops? &lt;br /&gt;Once, when I was selling encyclopedias door to door.&lt;br /&gt;&lt;br /&gt;2. Do you close your eyes on roller coasters? &lt;br /&gt;Nah, but they do pretty much scare the crap out of me.&lt;br /&gt;&lt;br /&gt;3. When’s the last time you’ve been sledding? &lt;br /&gt;I'm from Louisiana, so the list is a short one...  I remember going down a hill covered in 2" of snow on a cardboard box when I was maybe 10.&lt;br /&gt;&lt;br /&gt;4. Would you rather sleep with someone else, or alone? &lt;br /&gt;I've been married for almost ten years, I can't sleep when my wife's away.&lt;br /&gt;&lt;br /&gt;5. Do you believe in ghosts? &lt;br /&gt;I'm not ruling it out.&lt;br /&gt;&lt;br /&gt;6. Do you consider yourself creative? &lt;br /&gt;Yeah, not just writing but coming up with solutions at the day job (computers).&lt;br /&gt;&lt;br /&gt;7. Do you think O.J. killed his wife? &lt;br /&gt;Absolutely.&lt;br /&gt;&lt;br /&gt;8. Jennifer Aniston or Angelina Jolie? &lt;br /&gt;Jen fer shur.&lt;br /&gt;&lt;br /&gt;9. Do you stay friends with your ex’s? &lt;br /&gt;No, because all of my break-ups have been fairly painful.&lt;br /&gt;&lt;br /&gt;10. Do you know how to play poker? &lt;br /&gt;Know the rules?  Yeah.  Know the game?  Nah.&lt;br /&gt;&lt;br /&gt;11. Have you ever been awake for 48 straight hours?&lt;br /&gt;I've come close, but always managed to get a couple hours in their somewhere.&lt;br /&gt;&lt;br /&gt;12. What’s your favorite commercial? &lt;br /&gt;The cell phone "theft deterrent" commercial was pretty funny.&lt;br /&gt;&lt;br /&gt;13. What are you allergic to? &lt;br /&gt;Cigarette smoke.&lt;br /&gt;&lt;br /&gt;14. If you’re driving in the middle of the night, and no one is around do you run red lights? &lt;br /&gt;No way.  "History is made at night! Who you are is who you are in the dark!"&lt;br /&gt;&lt;br /&gt;15. Do you have a secret that no one knows but you? &lt;br /&gt;Not as far as you know.&lt;br /&gt;&lt;br /&gt;16. Boston Red Sox or New York Yankees? &lt;br /&gt;Sox.  It takes guts to keep fighting when the situation is hopeless.&lt;br /&gt;&lt;br /&gt;17. Have you ever been Ice Skating? &lt;br /&gt;I've been a few times and really enjoyed it, but that pretty much ended when I hurt my achilles tendon a few years ago.&lt;br /&gt;&lt;br /&gt;18. How often do you remember your dreams? &lt;br /&gt;Fairly often.  &lt;br /&gt;&lt;br /&gt;19. When was the last time you laughed so hard you cried? &lt;br /&gt;Can't recall.&lt;br /&gt;&lt;br /&gt;20. Can you name 5 songs by The Beatles? &lt;br /&gt;Puh-leeze.  "Please Please Me", "Twist And Shout", "Love Me Do", "Saw Her Standing There", and "A Taste Of Honey".  And that's from their first album.&lt;br /&gt;&lt;br /&gt;21. What’s the one thing on your mind now? &lt;br /&gt;Cleaning the house before my wife gets home tonight.&lt;br /&gt;&lt;br /&gt;22. Do you know who Ghetto-ass Barbie is? &lt;br /&gt;Considering that my blond, blue-eyed wife grew up in the 'hood - it's her!  Plus she's bootylicious.&lt;br /&gt;&lt;br /&gt;23. Do you always wear your seat belt?&lt;br /&gt;I can't even get in a car without putting on the belt.  Makes me feel naked.&lt;br /&gt;&lt;br /&gt;24. What cell service do you use? &lt;br /&gt;Cingular, or New AT&amp;T, or whatever the hell they're calling it these days.&lt;br /&gt;&lt;br /&gt;25. Do you like Sushi?&lt;br /&gt;Barf.  My wife loves it, so I tried it once.  That's like the tenth time I've mentioned my wife in this post - can you tell I miss her?&lt;br /&gt;&lt;br /&gt;26. Have you ever narrowly avoided a fatal accident? &lt;br /&gt;That was NO ACCIDENT!&lt;br /&gt;&lt;br /&gt;27. What do you wear to bed? &lt;br /&gt;Jockeys.  Oh, and underwear too.&lt;br /&gt;&lt;br /&gt;28. Been caught stealing? &lt;br /&gt;Only in baseball.&lt;br /&gt;&lt;br /&gt;29. What shoe size do you have? &lt;br /&gt;12D.&lt;br /&gt;&lt;br /&gt;30. Do you truly hate anyone? &lt;br /&gt;Can't really think of anyone, though there are a few people who disgust me, which is totally different.&lt;br /&gt;&lt;br /&gt;31. Classic Rock or Rap? &lt;br /&gt;Classic Rock.  I don't hate rap, I just don't care for it.&lt;br /&gt;&lt;br /&gt;32. If you could sleep with one famous person, who would it be? &lt;br /&gt;First, let's assume my wife becomes famous.  So, my wife.&lt;br /&gt;&lt;br /&gt;33. Favorite Song? &lt;br /&gt;"Girlfriend", Matthew Sweet.&lt;br /&gt;&lt;br /&gt;34. Have you ever sang in front of the mirror? &lt;br /&gt;Yup. One of those three-panel jobs.  The other people in Men's Suits were not amused.&lt;br /&gt;&lt;br /&gt;35. What food do you find disgusting? &lt;br /&gt;Escargot.&lt;br /&gt;&lt;br /&gt;36. Do you sing in the shower? &lt;br /&gt;Of course.  I have a 28-shower tour later this year.&lt;br /&gt;&lt;br /&gt;37. Did you ever play, “I’ll show you mine, if you show me yours”? &lt;br /&gt;Nah, too shy when I was a kid.  Much to my chagrin, I found out that line doesn't work when you're older.&lt;br /&gt;&lt;br /&gt;38. Have you ever made fun of your friends behind their back? &lt;br /&gt;Yes, but I wouldn't say anything that I wouldn't say to their face.&lt;br /&gt;&lt;br /&gt;39. Have you ever stood up for someone you hardly knew? &lt;br /&gt;Yes. You gotta help a brother out when the man's keeping him down.&lt;br /&gt;&lt;br /&gt;40. Have you ever been punched in the face? &lt;br /&gt;I'm sure, but it's been over 20 years.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/memes" rel="tag"&gt;Memes&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/07/all-cool-kids-are-doing-it-and-so-is.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115177157148339073'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115177157148339073'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115179748331844681</id><published>2006-07-01T18:36:00.000-05:00</published><updated>2006-11-30T12:55:08.543-06:00</updated><title type='text'>Andre The Giant</title><content type='html'>Andre Agassi announced last week that he was retiring after the U.S. Open, and today he played his last match at Wimbledon, defeated by rising star Rafael Nadal.  Agassi's career has taken many twists and turns.  He showed promise early but was soon eclipsed by Pete Sampras.  Andre turned it around in 1992, finally winning his first major, and it looked as if he and Pete and the other young Americans (Jim Courier, Michael Chang) would be duking it out for the rest of the decade.&lt;br /&gt;&lt;br /&gt;But within a few years his ranking fell below 100, and he resorted to playing Challenger events, tennis' minor leagues.  Then he teamed with new coach Brad "Winning Ugly" Gilbert and returned to the top of the sport, completing a career Grand Slam in 1999 and winning the Australian and U.S. Opens.&lt;br /&gt;&lt;br /&gt;Last year he made a run to the U.S. Open final by winning three straight five-set matches, and gave Roger Federer some trouble before finally falling in four sets.&lt;br /&gt;&lt;br /&gt;Throughout his career Agassi has always been considered a gentleman, and he may eventually be remembered more for that than for the titles he won.  Case in point: His career went off the rails during his brief marriage to Brooke Shields.  Later, he was asked if he regretted making tennis a secondary priority.  He said no, that would be to say that his time with Brooke wasn't special, and didn't mean anything.  He wouldn't do that.&lt;br /&gt;&lt;br /&gt;Now of course he's married to Steffi Graf and has a couple of kids.  Fatherhood seems to suit him.  Throughout Wimbledon he's been wearing a necklace made by his son Jaden that says "DAD ROCKS".&lt;br /&gt;&lt;br /&gt;So goodbye, Andre.  Thanks for being a good guy and a good player.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/tennis" rel="tag"&gt;Tennis&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/07/andre-giant.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115179748331844681'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115179748331844681'></link><author><name>Graham</name></author></entry><entry><id>tag:blogger.com,1999:blog-3309715.post-115194579701743645</id><published>2006-07-03T11:55:00.000-05:00</published><updated>2006-11-30T12:53:08.463-06:00</updated><title type='text'>Today's Sign That The Apocalypse Is Upon Us</title><content type='html'>Actual headline from &lt;a href="http://www.si.com"&gt;SI.com&lt;/a&gt;: "Wallace unhappy with Detroit's $49.6M offer".&lt;br /&gt;&lt;br /&gt;Yikes.&lt;br /&gt;&lt;br /&gt;&lt;font size="-1"&gt;Tags: &lt;a href="http://technorati.com/tag/basketball" rel="tag"&gt;Basketball&lt;/a&gt;.&lt;/font&gt;</content><link rel='alternate' type='text/html' href='http://www.myboogpages.com/2006/07/todays-sign-that-apocalypse-is-upon-us.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115194579701743645'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3309715/posts/default/115194579701743645'></link><author><name>Graham</name></author></entry></feed>