473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Auto populate / Auto increment in VB ASP.NET

Hello, all...

Just finished a handy tutorial that has helped me understand how to auto increment and post to a web page... but its only a Web User Control passing values from VB.NET method statements... I really need the increment and post from a SQL Server 2000 database

See Example:
http://sql-paul.com/lesson27_VB/Default.aspx

See Flowchart/Code Behind (I created it in Visio)
http://sql-paul.com/lesson27_VB/Cont..._Flowchart.htm

Now.... thats all fine and dandy... great tutorial... but how do I increment from a SQL database, rather than just simple little += 1 auto incrementors???

Any help would be greatly appreciated.

Thanks,

Best,
Paul
Jun 3 '09 #1
3 4592
dorandoran
145 100+
Do some search on SELECT SCOPE_IDENTITY()
Jun 4 '09 #2
thanks, I followed your advice SELECT SCOPE_IDENTITY() and came across a moderator on asp.net, his name is Bob. Bob writes "I needed to retrieve a new ticket number upon insert...." so thats kinda like what I need to do.

Basically, I'm creating this VB.NET form to database project
for a manufacturing company, and they want their employees to click on the web based form and have a brand new reference number autopopulate the field.

Like I mentioned, I don't know how to get the Reference Number/Doc ID on the VB web form to autopopulate from the SQL Server database.

Dorandoran, any chance you have working code available for this scenario?

Thanks,
Best,
Paul
Jun 4 '09 #3
Frinavale
9,735 Expert Mod 8TB
Dorandoran's suggestion puts it best....

You should really do some research on SQL IDENTITY. Using Identities will probably solve your problem for you.
Jun 4 '09 #4

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

Similar topics

11
by: csomberg | last post by:
SQL 2000 I thought I would throw this out there for some feedback from others. I'd like to know if you feel using MS auto-increment field is a good solution these days or should one grow their...
2
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
5
by: Paulovič Michal | last post by:
hi all, I have problem with SERIAL field type (or sequence functionality). I have table with three columns - ID, IDS, NAME. I want auto-increment IDS grouped by ID. Example: 1, 1, Ferdo 1, 2,...
5
by: vul | last post by:
In VB6 there is Auto Increment check box in Project Properties, which allow you have a new version every time you compile the project. Is there any easy way to have this feature in VB 2005? Some...
2
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I...
13
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
by: rashidaa | last post by:
How can I auto increment date in MS Access. I have a form in which I collect following data Range: From >> to Start Date: Now I wish to populate/append a table after I specify the start date...
2
by: paulyXvpf | last post by:
Hi All, FACTS: > I've created a VB.NET 2005 form, with a SQL Server 2000 backend > The form has about 30 fields that populate 30 columns in the SQL database > The form has mostly text feilds,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.