I figured out the problem already. It was the dataset. I tried to delete and start from beginning again, create the dataadapter, but this time, I did not generate dataset. So, First I delete the table from SQL Server, and then create new one with the same name. I change the property of the table in design mode, Identity = Yes, Identity Seed = 1, and Identity Increment= 1. And then create Dataadapter in design mode, without generating dataset. I ran the compiler, and it worked fine. I guess what I did previously was correct but probably messed up in the middle. Nevertheless, thank you very much Dave. You explained to me how the autonumber works.