Quantcast
Channel: SQL Server Compact Forum
Viewing all articles
Browse latest Browse all 193

Disallow a duplicate entry across two columns in a SQL CE database

$
0
0

Hi,

I have 4 columns in a table (rates) of my db  viz. SrKey (int), ItemID (int) {Related with another table}, DateValidFrom (datetime), Rate(double)

I want to disallow the user from adding a new rate for a particular item on the same date.

for eg. if there is a rate say $20 for ItemID 12, valid from 09/26/2012, I want to disallow a user from entering another rate valid from 09/26/2012 for the ItemID 12. but he can enter a new rate for another item (provided he hasn't entered a rate for that item on the same date)

I am using SQL CE 4. VB 2010 express

Please help


WinLight Learning the "Basic"s


Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>