473,507 Members | 2,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

auto number generation

1 New Member
i have created table in sqlserver and i connected to my front end vb.net
its working properly. i have one primary key field that should increment automatically how i can i do that
Oct 11 '07 #1
2 3387
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

You can declare the Column in SQL Server, as Auto Increment column :
Go to the Table Design and select the Column, Down at the column properties box change :

Identity = yes
Identity seed =Number you want to start with
Identity increment = how much to increment each time.

Regards
Veena
Oct 11 '07 #2
debasisdas
8,127 Recognized Expert Expert
else you can als select the max value of the primary key field +1 as the new value for the field.
Oct 11 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1654
by: Steve Barker | last post by:
Hi guys! In Visual Studio .NET, I like to enable auto-generation of XML documentation on the project properties screen, by adding an XML file name under "Configuration Properties" --> "Build"...
0
1263
by: Greg | last post by:
Hello, I'm about to write a database application and I'm wondering how to approach it. Is it worth to use the database code auto-generation (VC# 2005) in the long run? Or at some point I'll be...
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
3
5916
by: manivelk | last post by:
Hi, I am manivel.. Am doing C#.Net project.. I want to display the auto generation of numbers in a text box starts from 1.. But i dont know how to implement this.. If any one knows plz inform me.....
2
1944
by: smugcool | last post by:
hi All , I have got an idea of auto ticket generation through a program. Where it will import any new mail which will arrive at outlook and then it will auto generate a ticket id. I just wanted to...
13
12027
Hiren Joshi
by: Hiren Joshi | last post by:
Hi All, VB 6.0 and MS Access While Saving Record, I want Number to be Generated in following Format 140208-001, 140208-002, 140208-003 . . . etc... You must have noticed that 140208 is...
2
2509
by: Irving Guy | last post by:
Hi all, I’m trying to create a form with 15 fields that generates an auto number in one of those 15 fields. The auto generated number which should display like this – “081-2008-00001”...
16
539
by: jason.cipriani | last post by:
I am looking for a random number generator implementation with the following requirements: - Thread-safe, re-entrant. - Produces consistently reproducible sequences of psuedo-random numbers...
2
1692
by: infosyed | last post by:
Hai I am doing project in C#.Net. i want to know how to create the Auto Generation Number in Text Box. I want store that number in Sql Database also. Anyone can help me. Advance Thanks for Your...
5
8068
by: David Wright | last post by:
Hello Everyone I would be grateful if someone could help me with the automatic increment of a field on my subform called ‘Test_SrNo’. I am Using Microsoft Office 2000. The auto entry of the...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7485
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.