case sensitive primary key

  • Thread starter Thread starter AMC
  • Start date Start date
A

AMC

Hi,

Is there a way to create a primary key that is case sensitive? For example,
one that would recognize 'M7A' and 'M7a' as two distinct records?

Thanks!
A
 
Hi,

Is there a way to create a primary key that is case sensitive? For example,
one that would recognize 'M7A' and 'M7a' as two distinct records?

Not in Access, at least not that I've been able to discover.

The only solution I'm aware of is to create another field containing
the hexadecimal representation of the ASCII (or Uniscript) values of
the text string and use that as the PK. Obviously keep the readable
text around too, with a non-unique index; but JET indexes simply are
not case sensitive and cannot be made case sensitive.
 
Not really. You could convert the strings to their Ascii representation, and
store that instead, but it's a real kludge (and will take far more room in
your database, since you'll need to store 3 digits for each character.
 
Back
Top