Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Autoincrement ID field in a xsd

Autoincrement ID field in a xsd

Scheduled Pinned Locked Moved C#
xml
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tharkaway
    wrote on last edited by
    #1

    I have a table defined in a xsd that has an autoincrementing field that is used as the key to the table. The application uses ReadXML and WriteXML function to persists the dataset to an XML file. I am curious as to where the next value to use for the autoincrement field is persisted. I would have expected that when creating a new row in the table, the value for the ID field would be one greater than the highest value found in the table after the dataset is read in. It seems however to persist the highest value used in the past, even if those records have been deleted. In my application, when I create a new row, the ID field contains a 6071 when the highest value used before creating a new row was 5995. It does not appear that the autoincrement seed value is stored in the XML file itself, but where else would it be.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups