MD WebsUnlimited.com said:
If I was going to do this on the server side I would assume that the
database would have a third normal form and that this data would be placed
into a separate table. That table would contain a compound primary key that
is comprised of unique values using the credit card information.
..
The Fields Customer Number and Credit Card form a compound primary key value
that does not allow duplicates. If you attempt to add a record that is a
duplicate then an error would be raised.
Tough one, because we're both making assumptions that weren't in the
original question.
I assumed the problem as a loan application, wherein the customer
would list all open debts. The form would have 10 or 20 rows of text
boxes, with each row containing boxes for one Credit Card Name, Credit
Card Number, Expiration Date, Balance, and so forth.
I also assumed the requirement of getting all the data right before
attempting any database updates. That's why I loaded the data into a
disconnected recordset rather than attempting to add it to a database.
If you want to assume the requirement as starting a transaction,
attempting to load the data into a real database table, watching for
exceptions, and then doing backouts, that's equally valid (although
more resource intensive).
A reasonable person could also assume adding the data into the
database even if it contains errors, but setting some sort of status
code to Error so that no further processing occurred.
As to performing this edit on the browser, yet, it could be done, but
it could also be circumvented. I never, never, never trust a
browser-side edit.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------