473,386 Members | 1,785 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,386 software developers and data experts.

asking how to get max id from database

Dear friends,
Could you help me how to make such code.
I want to get the max id from database so I can add 1 to it and use it as a new id when I want to insert another row
thanks
:)
Jun 5 '07 #1
2 1612
Dear friends,
Could you help me how to make such code.
I want to get the max id from database so I can add 1 to it and use it as a new id when I want to insert another row
thanks
:)
You dont actually have to use maxid with regards to your problem.. just set your id into autonumber...
Jun 5 '07 #2
prabunewindia
199 100+
hi friend,
u can also use the following query,
select max(id) as maxid from <urTableName>
Prabu


Dear friends,
Could you help me how to make such code.
I want to get the max id from database so I can add 1 to it and use it as a new id when I want to insert another row
thanks
:)
Jun 5 '07 #3

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

Similar topics

4
by: anand | last post by:
Hi, I have an Access 2000 database, which contains some native tables, and some linked tables which belong to an ORACLE database, through ODBC. Using VB.NET, I am trying to fetch some data by...
5
by: Mark R | last post by:
Hi all, This is probably really simple but the answer has eluded me so far. I have a frontend application which when closed on PC's at work, just closes. However, when I close it (an exact copy)...
4
by: anand | last post by:
Hi, I have an Access 2000 database, which contains some native tables, and some linked tables which belong to an ORACLE database, through ODBC. Using VB.NET, I am trying to fetch some data by...
1
by: David C. Barber | last post by:
Asking again, I've just built my first Setup-Installable VB 2005 package. I have the full Profession Edition VS 2005, not the Express edition, and am patched to the current SP. It installs on...
1
by: AparnaKulkarni | last post by:
Want to call a crystal report of version 8.5 through VB.NET. In this the data is passed to report through XML file. On running this, the report asks for Database name, Server name, Userid, Pwd. ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.