Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate number appearing
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Duplicate number appearing
Miscellaneous
Thread ID:
00694665
Message ID:
00694665
Views:
54
Hello Sergey,

I am using the below code in the add button to get the next sequence number from the database table but it is not working properly.
It is getting the sequence number which is already there in the table.

Could you please tell me is there any other way to call the next good sequence number from table which does'nt exist.

this is the code i am using
***********************************Start************************************
SELECT Docindex
* set the sort order.
SET ORDER TO PJWPToFrom DESCENDING
SET NEAR ON
SEEK cProject_no+cWorkpkg_no+cToFrm
IF FOUND()
thisform.container1.sequence.value = INT(docindex.sequence+1)
thisform.container1.sequence.setfocus
ELSE
thisform.container1.Sequence.value = 1
thisform.container1.Sequence.setfocus
ENDIF

*****************************end*********************************************

Thank you very much Sergey.
Next
Reply
Map
View

Click here to load this message in the networking platform