-
Help
I really don't know how to ask this in a single sentence so here is the situation:
I have a database that has record about an item inventory. Based on the database's primary key which is item_no. If I have 10 records of Items in my database, then item_no should have the last element "10" in the column item_no. The problem is, I want to post in a textbox automatically the next item_no value which is "11". Can someone reply an answer in this thread? thanks!
-
Re: Help
You can use sql such
select (count(*) + 1) new_id from table1
or
select (max(pk_column_name) + 1) new_id from table1
via ado command/connection object.
For more information read VB6 ADO Tutorials (can be found in FAQ form, also link is available in DB Forum).