[ASSUMPTION 1]
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]
ds.Relations.Add("myRelation",
ds.Tables("parent").Columns("name"),
ds.Tables("child").Columns("name"));
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…
[ASSUMPTION 2]
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.
[SOLUTION 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!
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.