Re: Error in post with ADOSQLServer




"Del M" <Del.Murray@xxxxxxxxxxxxxx> wrote in message
news:429fbc97$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> What kind of a client doesn't allow primary keys ??? That's like telling
> your auto mechanic that he cant use tools but he better have the car fixed
> ... What difference can it make to the client ?

Users often think they are helping by saying things like "Nah, we don't need
that, don't make it so complicated"
Example? Just yesterday we had a meeting with a department VP and he wanted
to know more their promotion process (technical details) and how/why certain
updates affected the price change schedule. After explaining the
relationships between the different tables (business rules defined in
triggers, etc) he made the comment "We never asked for this process to be so
complicated. All we want is the ability to mark a product as being on
promotion or not. You know, a checkbox field or something."

That kind thinking isn't limited to users. It's amazing how developers can
make a simple process so complicated. Example? Sure...
<conversation between my boss, "John" and a junior developer "Sally">
Sally:"I'm trying to use the DevExpress grid for this query that has two
primary keys, but the grid's KeyField property only supports one field.
What can I do?"
John:"Hmm, you need to create a calculated field and populate it with a
random number. Check out the random function in the help file."
Sally:"I don't think that will work. Wouldn't the oncalc event generate new
values every time?"
John:"Oh yea, your right. How about using a incremental key? Call a stored
procedure that increments a value and store it in the dataset"
Sally:"What if I run out of numbers?"
John:"Well, by the time we run out of numbers, we will have to re-write the
program anyway, don't worry about it"
Sally:"I think I need to add another field to the table and make that the
primary key"
<I sit just behind them>
Me:"Hold on..why not create a calculated field that combines the composite
key? You can do it in the SQL or create a calculated TField"
Sally:"Uh...well...I tried that and it didn't work. I think I need to add
another field to make the grid work"
Me:"That's my table and your not going to add another field. Creating a
calculated field works, I'm using the method now on that table. I'll send
you an example"

Guess what, the KISS method worked (Keep It Simple S...--you know :)


krf


.



Relevant Pages

  • RE: indexes and relationships blown away sometimes
    ... I've seen users mess with things like primary keys when they became "too much ... This client of mine runs the app in a pretty harsh environment. ... with this level of corruption. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: indexes and relationships blown away sometimes
    ... I've seen users mess with things like primary keys when they became "too ... This client of mine runs the app in a pretty harsh environment. ... with this level of corruption. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: duplicate entry after update
    ... > I do try to avoid changing primary keys but short of having identities in ... where one client fetches a row and then later wants to modify it. ... Of course I then have to do an AcceptChanges after the ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Can I have a record within a record
    ... I create a simple Client Table with a text primary key. ... primary keys of the Orders and Products table. ... but in this case they both reference the primary ... So if someone with a PersonID value of 42 ...
    (microsoft.public.access.gettingstarted)