Auto Increment 
Author Message
 Auto Increment

Is there a simple method/property to add auto incrementting to each
table/form?  I want to use this to automaticlly assign an invoice number of
the next highest number and use it as my uniquie field.

Checking for MAX() record moves the record pointer.

Thanks,
steve,



Sat, 11 Nov 2000 03:00:00 GMT  
 Auto Increment

Steve,

Checking MAX() would potentially produce duplicates in a multi-user
environment.  You can put a function call in the default value of
your record's invoice number field.  I believe there is an example
of a routine in the Vfp\Samples\Tastrade app.  Also, in the library
section of the Universal Thread (www.UniversalThread.Com) I
believe there is a sample routine.

-myron kirby-

===========================

Quote:

>Is there a simple method/property to add auto incrementting to each
>table/form?  I want to use this to automaticlly assign an invoice number of
>the next highest number and use it as my uniquie field.

>Checking for MAX() record moves the record pointer.

>Thanks,
>steve,




Sat, 11 Nov 2000 03:00:00 GMT  
 Auto Increment

Look in your VFP solution samples solution modi proj and look at the new ID
and how it works. Basically you set up a table that has table name and
nextid as fields you can put this in your form for newid() it then accesses
the table takes the nextid for that table then increments it . When all is
said and done this maybe the best on there is. It is fully explained there.
John

--
-----------------------------------
Sender
John P. Chambers
Texas Licenses: LMSW-ACP, LPC, LMFT, LCDC
Business: Discovery Center, Inc. http://www.infohwy.com/~jpc/discovery
Computer info: Past President Hounix, Inc.(Unix User Group), Solutions Group

http://www.vfug.org/

Computer Name: jpc.sccsi.com or 207.90.224.68 MS Net Meeting direct

Quote:

>Is there a simple method/property to add auto incrementting to each
>table/form?  I want to use this to automaticlly assign an invoice number of
>the next highest number and use it as my uniquie field.

>Checking for MAX() record moves the record pointer.

>Thanks,
>steve,




Sun, 12 Nov 2000 03:00:00 GMT  
 Auto Increment

That works!

Thanks


Quote:
>Look in your VFP solution samples solution modi proj and look at the new ID
>and how it works. Basically you set up a table that has table name and
>nextid as fields you can put this in your form for newid() it then accesses
>the table takes the nextid for that table then increments it . When all is
>said and done this maybe the best on there is. It is fully explained there.
>John

>--
>-----------------------------------
>Sender
>John P. Chambers
>Texas Licenses: LMSW-ACP, LPC, LMFT, LCDC
>Business: Discovery Center, Inc. http://www.infohwy.com/~jpc/discovery
>Computer info: Past President Hounix, Inc.(Unix User Group), Solutions
Group

>http://www.vfug.org/

>Computer Name: jpc.sccsi.com or 207.90.224.68 MS Net Meeting direct


>>Is there a simple method/property to add auto incrementting to each
>>table/form?  I want to use this to automaticlly assign an invoice number
of
>>the next highest number and use it as my uniquie field.

>>Checking for MAX() record moves the record pointer.

>>Thanks,
>>steve,




Tue, 14 Nov 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Auto Increment Field

2. Auto-incrementing a primary key field

3. Auto Increment Field

4. Auto-Incrementing

5. Auto Incrementing Primary Key

6. Auto Increment Field

7. Auto-Incremented field

8. Auto-increment Field in Foxpro

9. How to make an auto-incrementing index

10. auto-incrementing a primary key

11. auto increment a field

12. VFP5 and "auto increment"

 

 
Powered by phpBB® Forum Software