Assumptions are the DEVIL

I’ve been banging my head against the cubicle wall for the past few days trying to figure out why my code wasn’t working (Figure 1) based in the code I found on MSDN. I kept on getting some error about the items are not unique. So I tried almost EVERYTHING assuming that the parent.[name] column was unique. Of the 300 or so records, one repeated itself.

BEHOLD THE TRUTH: name was not unique.

[Figure 1]
parentRepeater.DataSource = ds.Tables("parent");

[/Figure 1]

[(temporary) SOLUTION 1:]
Put DISTINCT in the SELECT statement. Whoever created this database is driving me NUTS. They tell me its unique, and it’s NOT!!! I now need to edit my query to get the most recent name created. MORE WORK…

The lady I called up today to get an apartment assumed their complex let people get 2 month leases. So after work I drive up, and get rejected by the manager!

BEHOLD THE TRUTH: 3 month leases minimum, even if the lady says it’s 2.

I’ll be getting my own place still, but in a freaking Homestead Suite or something like that. Hopefully there’s free cable, internet, a pool, and a place to work out. I KNEW apartments only had a 3 month minimum!

One thought on “Assumptions are the DEVIL

  1. you should’ve looked at the database table and made the ‘name’ a primary key. that would’ve forced it to be unique or give you an error otherwise.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve this: Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.