Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incrementing field values
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Incrementing field values
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012143
Message ID:
01012143
Views:
61
I have a table which stores details about file attachments for every record which is denoted by mainkey. So for every mainkey the path to where it is stored with a date and time stamp is recorded.
T59*SS2005*JKT108*SAMPLE             '\\lean\vault\ss2005\JKT108.pdf'         19/02/2003 15:13
T59*SS2005*JKT109*TECHNICAL          '\\lean\vault\ss2005\JKT109.pdf'         21/02/2003 16:12
The problem is for each record there is whats known as an attach key. Therefore if the mainkey has never been created in the table a value of 2 is stored against that record in the table. Therefore if another attachment against the same mainkey is stored then it increases this value to 3. When writing a new record how can I increase the attachkey value if a record exists for this mainkey. So for example if I added another attachment to the first record above, as there is one already there ther attachkey field would be 3 and then 4 etc etc.

Thanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Next
Reply
Map
View

Click here to load this message in the networking platform