How to get next auto increment value from access database in c# during insert statement

前端 未结 2 527
别那么骄傲
别那么骄傲 2021-01-25 22:55

I am currently entering data from a Windows Form Application written in C#. My Database is a Microsoft Access Database. Everything is working fine accept I keep getting errors

2条回答
  •  甜味超标
    2021-01-25 23:13

    I belive you need to set autoincrement somethink like

    ALTER TABLE MonsterDrops
       ALTER COLUMN ID AUTOINCREMENT(1001,1)
    

    basically replace 1001 with your last ID and you want to increment your next insert by 1

提交回复
热议问题