>  But I want to check for the existance prior and
> give the user an ability at a later date to update the record.

maybe i don't understand

if you check for existence first, and it's not there, don't you just go
ahead and do the insert?

and if it is already there, don't you just display a message?

the strategy i outlined is totally compatible with that, and has the exact
same visible results as far as the user is concerned, but it's more
efficient

as for updating later, that's a different situation

any update of a value in a column declared with a unique constraint is
automatically checked by the database engine to ensure that the new value
is not already there

again, you *could* test to see if the new value is there already yourself,
but why bother?

just trap the database error and issue your own user-friendly message

same result as far as the user is concerned

moral:   let the database do the work

results in cleaner code, too


rudy

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "rudy" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to