• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1311
  • Last Modified:

Auto increment issue with tableadapter insert

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.

Thanks,

Brad
0
bradbritton
Asked:
bradbritton
1 Solution
 
g_johnsonCommented:
what kind of database are you updating?
0
 
bradbrittonAuthor Commented:
MS SQL 2005 database
0
 
ComputronCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now