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. Visual Basic
  4. Autonumber problem in Access database

Autonumber problem in Access database

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasehelpannouncement
3 Posts 3 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.
  • P Offline
    P Offline
    progalx
    wrote on last edited by
    #1

    in VB.net 2005 I have problems when i try to insert new record in Access database with Update method.The record has a field Autonumber.And after inserting , in dataset the value of this field is 0, in database is ok.

    E 1 Reply Last reply
    0
    • P progalx

      in VB.net 2005 I have problems when i try to insert new record in Access database with Update method.The record has a field Autonumber.And after inserting , in dataset the value of this field is 0, in database is ok.

      E Offline
      E Offline
      enmahdi
      wrote on last edited by
      #2

      if you are inserting data by dataadaptor and you donot fill dataset after inserting it can be happen . so I think it is better you fill your dataset after per record inserting .

      D 1 Reply Last reply
      0
      • E enmahdi

        if you are inserting data by dataadaptor and you donot fill dataset after inserting it can be happen . so I think it is better you fill your dataset after per record inserting .

        D Offline
        D Offline
        dcode25
        wrote on last edited by
        #3

        Thank you. The record is inserted in dataset with add(row).But when the dataadapter.update method is executed the record in database is ok , but in dataset the atonumber field is 0. Yes , is possible to fill again the dataset but the application is running on network and if i fill dataset everytime i add new record slow down the app. i know there is a method Select identity but i don't know how to do it.

        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