R
rn5a
I created a MS-Access DB table with the following 3 columns:
ColID - PRIMARY KEY
Col1 - Number
Col2 - Date/Time
Next I created a multi-field index using Col1 & Col2. I entered the
following row in the 1st row:
1 5/10/2007
Next when I tried to add the above row again, as expected, I wasn't
allowed to enter the same row. Next I entered the following 2 rows:
1 5/11/2007
2 5/10/2007
Both the rows were accepted. After this I deleted the 3 records, went
back to the design view & changed the data type of Col2 from Date/Time
to Number keeping the multi-field index as it is.
After this I entered the following row in the table which is the 1st
row (in Col1, Col2 order):
1 1
Now when I again entered the above row, Access accepted it but when
the data type of Col2 was Date/time, Access didn't allow me to enter a
row whose column values already existed in the table.
Does preventing duplicates using indexes work only with Date/Time data
type?
ColID - PRIMARY KEY
Col1 - Number
Col2 - Date/Time
Next I created a multi-field index using Col1 & Col2. I entered the
following row in the 1st row:
1 5/10/2007
Next when I tried to add the above row again, as expected, I wasn't
allowed to enter the same row. Next I entered the following 2 rows:
1 5/11/2007
2 5/10/2007
Both the rows were accepted. After this I deleted the 3 records, went
back to the design view & changed the data type of Col2 from Date/Time
to Number keeping the multi-field index as it is.
After this I entered the following row in the table which is the 1st
row (in Col1, Col2 order):
1 1
Now when I again entered the above row, Access accepted it but when
the data type of Col2 was Date/time, Access didn't allow me to enter a
row whose column values already existed in the table.
Does preventing duplicates using indexes work only with Date/Time data
type?