none
I want to create staff numbers that will be 5 digits and divisible by 7 primary key and auto increment RRS feed

  • Question

  • I have a question. I am new to .net platform. I am designing a database with sql 2008 and vb 2010. I want to create staff numbers that will be 5 digits and divisible by 7. I would have loved to make this primary key and auto increment and there should be default number. how do I do this? PLS HELP ME.
    • Moved by Mark Liu-lxf Monday, March 12, 2012 8:27 AM (From:Visual Basic IDE)
    Saturday, March 10, 2012 7:50 AM

Answers

  • If you want to have it autonumber than it is not something to do with Ado.Net

    You have to do that in your database, use an int and set the seed to 7

    Be aware in fact it makes absolute no sense which digital representation you use for a primary key as it should in fact be a technical ID and not a logical ID.


    Success
    Cor

    Tuesday, March 13, 2012 8:59 AM

All replies

  • Hi damisagurus,

    Welcome to the MSDN forum.

    This queue is about Visual Basic IDE. I’m afraid that your topic about database setting  is unsuitable here. I will move this thread to ADO.NET DataSet forum.

    Sorry for any inconvenience and have a nice day.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Monday, March 12, 2012 8:26 AM
  • I've Got Your Number 


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    Tuesday, March 13, 2012 12:16 AM
  • If you want to have it autonumber than it is not something to do with Ado.Net

    You have to do that in your database, use an int and set the seed to 7

    Be aware in fact it makes absolute no sense which digital representation you use for a primary key as it should in fact be a technical ID and not a logical ID.


    Success
    Cor

    Tuesday, March 13, 2012 8:59 AM