Auto generate ID Number

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2008
Posts: 14
Reputation: ahmbil is an unknown quantity at this point 
Solved Threads: 0
ahmbil ahmbil is offline Offline
Newbie Poster

Auto generate ID Number

 
0
  #1
Aug 14th, 2008
i want to auto generate an ID like 1, 2, 3.
and anytime i close my application and open it again it should start from the Id it stopped.
if i enter up to 6 the next one should be 7.
Can anybody help me?
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: Auto generate ID Number

 
0
  #2
Aug 14th, 2008
Use to save the last number auto number in a separate table so that whenever you add another record, get the last number and then add one number for a new auto number and then update the last number in the Autonumber Table again. In this way, you can simply make auto number.

eg. lastno=Last number stored in the table
lastno=Val(lastno)+1

You can Save the Last Auto number using database table or using Text File.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 14
Reputation: ahmbil is an unknown quantity at this point 
Solved Threads: 0
ahmbil ahmbil is offline Offline
Newbie Poster

Re: Auto generate ID Number

 
0
  #3
Aug 14th, 2008
Originally Posted by K.Vanlalliana View Post
Use to save the last number auto number in a separate table so that whenever you add another record, get the last number and then add one number for a new auto number and then update the last number in the Autonumber Table again. In this way, you can simply make auto number.

eg. lastno=Last number stored in the table
lastno=Val(lastno)+1

You can Save the Last Auto number using database table or using Text File.

Hello i hav tried but i can get it please can you send me a sample code
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 520
Reputation: selvaganapathy is an unknown quantity at this point 
Solved Threads: 89
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro

Re: Auto generate ID Number

 
0
  #4
Aug 14th, 2008
Similar Problem already discussed in the following thread http://www.daniweb.com/forums/thread135921.html
Selva
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: Auto generate ID Number

 
0
  #5
Aug 15th, 2008
Dear All,
Plz focus on the exact problem.
When u r posting in this forum, first do give the backend u r using, table structure if possible, some sample code in front end which u r having problem with. 'll definitely help us to help u all.

regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Auto generate ID Number

 
0
  #6
Aug 15th, 2008
Originally Posted by aktharshaik View Post
Dear All,
Plz focus on the exact problem.
When u r posting in this forum, first do give the backend u r using, table structure if possible, some sample code in front end which u r having problem with. 'll definitely help us to help u all.

regards
Shaik Akthar
Rite
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: Auto generate ID Number

 
0
  #7
Aug 16th, 2008
Originally Posted by ahmbil View Post
Hello i hav tried but i can get it please can you send me a sample code
Please post your sample code and Table , from that I will try the corrected code.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5514 | Replies: 6
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC