?
Solved

Field increment

Posted on 2007-03-26
3
Medium Priority
?
290 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 1000 total points
ID: 18792397
TypeID [int] IDENTITY(1,1) NOT NULL

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

650 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