-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SriSamp
Message 3 in Discussion

There are many ways by which you can implement this. I'm assuming that you are using 
SQL Server for the storage of data, but the solution can work with other databases 
also.   (1) Use a stored procedure for your logic. Send in the combination to check as 
a parameter to the stored procedure and inside the procedure, you can check whether 
the combination already exists and based on that decide to insert or return back an 
error. (2) Use a trigger for same. Inside the trigger you can do the same logic as 
that of the stored procedure and on failure rollback the transaction.   Personally, I 
prefer using a stored procedure, since it eases maintenance.   HTH, Srinivas Sampath 
MVP - SQL Server http://www32.brinkster.com/srisamp  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to