Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 10th, 2008, 01:06 AM
Registered User
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to GIGAM25
Default vb.net sql autonumber insert


can anyone help me how to generate autonumber in sql2000 when i insert a row using vb.net 2003

thank you

Old July 10th, 2008, 01:10 AM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Nothing to do with VB or anything else relevant to ASP.NET or the .NET framework.

You just have to declare the field in the table as IDENTITY when you create (or modify) the table.


    name NVARCHAR(80),

If you don't use SQL to create your tables, then look at the tool you are using to create/modify your tables and figure out what it needs you do to tell it that you want in IDENTITY column.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a CATIA preview in VB.net Forms Zaman_mech VB How-To 1 September 21st, 2007 12:01 PM
Autonumber and insert into statement. rupen Access VBA 1 July 27th, 2007 02:23 PM
DB insert, VB.NET MDM ASP.NET 2.0 Basics 1 June 29th, 2006 06:14 PM
Data insert into Acess using vb.net (1.1) MDM VB Databases Basics 0 March 5th, 2006 01:38 PM
How to insert a Picture in SQL Server using VB 6.0 swadhinm Pro VB Databases 0 September 21st, 2005 06:52 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.