[Last Call] Learn how to a build a cloud-first strategyRegister Now


Auto increment issue with tableadapter insert

Posted on 2006-03-21
Medium Priority
Last Modified: 2013-12-25
I have a tableadapter insert that inserts the data into my database,but I need to specify in the record number in the insert command. How do I code this for an auto incrementing value?, as I cannot leave it as nothing on the insert.


Question by:bradbritton

Expert Comment

ID: 16252028
what kind of database are you updating?

Author Comment

ID: 16252217
MS SQL 2005 database
LVL 15

Accepted Solution

Computron earned 2000 total points
ID: 16252296
You have to set the field in MS SQL as data type INT and check the Identity column as this will tell MS SQL that this field is an auto incrementer. Then you do not need to include that field in your insert statement.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question