Solved

Field increment

Posted on 2007-03-26
3
278 Views
Last Modified: 2013-11-07
I'm creating a table like the 1 below through VB.NET

 '' New table string
            Dim tmpSql As New StringBuilder
            tmpSql.Append("CREATE TABLE TOPS_CREW_CRANE (")
            tmpSql.Append("TypeID int, ")
            tmpSql.Append("Sequence nvarchar(5), ")
            tmpSql.Append("Description nvarchar(100), ")
            tmpSql.Append("BaseQty tinyint, ")
            tmpSql.Append("Factor decimal(15, 3))")

How can I make TypeID an identity field so it automatically increments?
0
Comment
Question by:thenrich
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:doraiswamy
ID: 18792370
I presume it is MySql.
Try "TypeID int auto_increment,"
0
 
LVL 5

Author Comment

by:thenrich
ID: 18792377
SQL server 2005

sorry
0
 
LVL 8

Accepted Solution

by:
drydenhogg earned 250 total points
ID: 18792397
TypeID [int] IDENTITY(1,1) NOT NULL

0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

738 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