Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Manisha Sathe
  Where is Manisha Sathe?
 
 Singapore
 Manisha Sathe
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: how to generate running id
Thread ID: 33675 Message ID: 33728 # Views: 3 # Ratings: 0
Version: Visual FoxPro 8 Category: Forms
Date: Tuesday, December 02, 2003 4:16:41 PM         
   


yes i tried with AutoInc, i got what i wanted, want to ask one more thing -

i have add/save/cancel buttons - form in buffermode. When user clicks on add it appends blank, save does - tableupdate() and cancel does tablerevert()

Now i get automatic running no when i do add/save(e.g - 1), but when i click add and then cancel then also i think internally it generates one no. and cancels that. So next add/save action gives me next no as 3 and not 2.

Is there any way to avoid it ?

I also went thr the article it has given one new way to generate key. (PrimaryKeys without problems by VLADIMIR TRUKHIN)
whether this solves it ?


manisha


>
> VFP8 has the AutoInc field type that you can use to auto-generate id's. You can also check the Article section for two articles on how to create primary keys. Your third option is to check the NewID() stored procedure in the Tastrade sample database.
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts


ENTIRE THREAD

how to generate running id Posted by Manisha Sathe @ 12/1/2003 6:03:58 PM
RE: how to generate running id Posted by Eric den Doop @ 12/1/2003 6:12:45 PM
RE: how to generate running id Posted by Manisha Sathe @ 12/2/2003 4:16:41 PM
RE: how to generate running id Posted by Moose Taylor @ 12/2/2003 4:23:52 PM
RE: how to generate running id Posted by Jez Enefer-Mills @ 12/2/2003 5:22:08 PM
RE: how to generate running id Posted by Moose Taylor @ 12/2/2003 5:36:12 PM
RE: how to generate running id Posted by Jez Enefer-Mills @ 12/2/2003 5:45:02 PM
RE: how to generate running id Posted by Moose Taylor @ 12/2/2003 5:47:12 PM
RE: how to generate running id Posted by Moose Taylor @ 12/2/2003 5:51:25 PM
RE: how to generate running id Posted by Jez Enefer-Mills @ 12/2/2003 5:55:21 PM
RE: how to generate running id Posted by Eric den Doop @ 12/3/2003 12:55:22 AM
RE: how to generate running id Posted by Manisha Sathe @ 12/3/2003 10:29:26 AM