Auto-Incremented field 
Author Message
 Auto-Incremented field

I'd like to know how to implement the same simplicity I've
been used to find in Acess to specify a field type as "self
or auto-incremented"(my acess is in Portuguese). I couldn't
find any tip in Visual FoxPro 3.0 in how to do this.

* Sent from AltaVista http://www.*-*-*.com/ Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful



Sun, 29 Dec 2002 03:00:00 GMT  
 Auto-Incremented field
First of all, you'll have to use a .dbc. Then, in the default value for the
field you're interested in, place a function that looks up the current
highest value and returns that value + 1. There are a few ways to do this,
each one has its own programmatic overhead. For example, I store all my key
values in a separate table with the name of the dbf in question.

Quote:
> I'd like to know how to implement the same simplicity I've
> been used to find in Acess to specify a field type as "self
> or auto-incremented"(my acess is in Portuguese). I couldn't
> find any tip in Visual FoxPro 3.0 in how to do this.

> * Sent from AltaVista http://www.altavista.com Where you can also find

related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
Beautiful


Sun, 29 Dec 2002 03:00:00 GMT  
 Auto-Incremented field

Amarcial,

In VFP6 there is an example of how to do this in the TasTrade project.  If
it's in the same place it's the NewId() stored procedure in the TasTrade
dbc.

--

Cindy Winegarden
Microsoft Certified Professional, Visual FoxPro

Duke Children's Information Systems
Duke University Medical Center


| I'd like to know how to implement the same simplicity I've
| been used to find in Acess to specify a field type as "self
| or auto-incremented"(my acess is in Portuguese). I couldn't
| find any tip in Visual FoxPro 3.0 in how to do this.
|
|
| * Sent from AltaVista http://www.altavista.com Where you can also find
related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
Beautiful



Sun, 29 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Auto Increment Field

2. Auto Increment Field

3. Auto Increment Field

4. Auto-increment Field in Foxpro

5. auto-increment field

6. howto calculated autoincremented field in sql query?

7. Auto-incrementing a primary key field

8. auto increment a field

9. Visual FoxPro ODBC driver fails with "Not a table" if table has auto-incrementing field

10. is there anyway to make an auto-increment field as in Access?

11. Auto Increment

12. Auto-Incrementing

 

 
Powered by phpBB® Forum Software