• Post Reply Bookmark Topic Watch Topic
  • New Topic

Secret code  RSS feed

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Am trying to generate a secret code for each data that is entered into a datbase (the secret code column is the primary key), pls how can i generate this code, any formular or format?,
i need help.
 
Author and ninkuma
Marshal
Posts: 66347
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frequently, a database sequence is used to generate a unique numeric value for use as a primary key.
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from other threads, I'm assuming your using MSAccess. The 'Sequence' functionality Bear mentioned above can also be accomplished in MSAccess. Just set the column you want as the primary key's data type to 'AutoNumber'. As an autonumber field, you never insert or update values in it. Access does everything for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!