What is max key length?

arcull
arcull Member Posts: 191
Hi everyone. I know there are some limitations when creating keys in tables on native db, because I once encoutered a problem, when it did not let me create new secondary keys, saying that max. total length of keys is xxx bytes. So I wonder if anyone knows better about the limitations of keys, what is actual max length and how do you calculate it from field types and lenghts you put in keys. Thanks for help.

Comments

  • DaveT
    DaveT Member Posts: 1,039
    Hi,

    The max is 252 characters and 20 fields. Be careful as you need to add the primary key size to secondary key. Add up the length of each field to find the size of the key
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • kriki
    kriki Member, Moderator Posts: 9,127
    If you're working on SQL, you can also use the indexproperty "SQLIndex". If you search the forum, you will find a lot of info on how to use it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • arcull
    arcull Member Posts: 191
    Thanks guys