开发者

Is there a rule to define a primary key on a sql-Server table for access with MS-Access?

开发者 https://www.devze.com 2023-01-03 02:47 出处:网络
Defining some Tables in 开发者_JAVA百科SQL-Server which will be accessed via ODBC from MS-Access.

Defining some Tables in 开发者_JAVA百科SQL-Server which will be accessed via ODBC from MS-Access. I'm not sure about it, put i read somewhere that a primary key must bee named with 'aaaaaPK_ColumnName'.

The 5 'a' should manage that the PK is listed first in the dialog for all key's in MS-Access.

What do you think about that?


I found, that a the only rule is to have a good primary key defined. The Name of the key isn't that importand (shouldn't be too long).

Do not define more than 31 Keys if you want that access don't throw an error.

Thats all if you do not have the sql-table under replication. in this case choose a primary key with a characterbased datatpye. numeric datatypes in primary key have conficts with the sql2008 merge replication-insert-triggers.

sql2000 does not have this constraint, because the merge replication - insert-trigger do not populate a table with a identity-column.

beside good primary key(s) a column with a datatype timestamp in each table is also recommended.

0

精彩评论

暂无评论...
验证码 换一张
取 消