case sensitive primary key

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
 
J

John Vinson

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.
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top