Re: Error in post with ADOSQLServer
- From: "Kevin Frevert" <kevin@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Jun 2005 07:08:25 -0500
"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
.
- References:
- Re: Error in post with ADOSQLServer
- From: Del M
- Re: Error in post with ADOSQLServer
- Prev by Date: How to get the parameter list of an Oracle SP at run-time
- Next by Date: Re: Aggregates with where clause matching no rows
- Previous by thread: Re: Error in post with ADOSQLServer
- Next by thread: How to get the parameter list of an Oracle SP at run-time
- Index(es):
Relevant Pages
|