none
Why in Visual Studio autoIncrementStep property for a field is set to -1 incorrectly? RRS feed

  • Question

  • In SQL Server Management Studio, i  create table, there is a field in this table with identity increment=1, and, identity seed=1, but, in Visual studio 2010 when i create a dataset with Add new data source wizard, the AutoIncrementSeed and AutoIncrementStep properties for this field are set to -1 incorrectly and i have to set these values to 1, by hand. What is the problem? It's a bug for Microsoft Visual studio or ...?
    Sunday, February 19, 2012 9:01 PM

Answers

  • What should happen as the 1 already exist.

    Be aware the time that the database was for one user is past.

    So another user has created a first datarow and that has gotten the identifier 1.

    Bang you are inserting that one but it already exist.

     


    Success
    Cor

    Tuesday, February 21, 2012 3:54 PM

All replies

  • Iman

    The seed increment in .Net is created to make a temporally setting for added table rows with autoidentifiers. After the update the temporally is set to the original. The minus is used because it is for sure not allike the original one which should create unpredictable situations (it simple would throw an error but whatever). 

    This is for sure no bug. Setting a autoidentifier to an absolute value in a program by hand is ............................... you may enter that text yourself.

    :-)


    Success
    Cor



    • Edited by Cor Ligthert Tuesday, February 21, 2012 10:26 AM
    Tuesday, February 21, 2012 10:25 AM
  • I can't undrestand your purpose. can you tell me more ? why should create unpredictable situations ?

    Tuesday, February 21, 2012 11:55 AM
  • What should happen as the 1 already exist.

    Be aware the time that the database was for one user is past.

    So another user has created a first datarow and that has gotten the identifier 1.

    Bang you are inserting that one but it already exist.

     


    Success
    Cor

    Tuesday, February 21, 2012 3:54 PM