Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RLOCK and buffering and saving data VFP 9 vs VFP 7
Message
From
08/02/2007 16:28:12
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01193846
Message ID:
01193874
Views:
11
>>>>I have several forms which have code similar to
>>>>
x = tableupdate(.t.,.t.,'tablename')
>>>>It works in VFP 7 but not in VFP 9. The form has a burffermode of 2 (optimistic buffering) and the table a buffermodeoverride of 5 (optimistic table buffering).
>>>>
>>>>Any one have suggestions on why this is happening and/or how to determine the problem?
>>>>
>>>>TIA
>>>
>>>And what AERROR() said?
>>>
>>>IF NOT tableupdate(.t.,.t.,'tablename')
>>>   AERROR(laError)
>>>   MessageBox(laError[1,2])
>>>ENDIF
>>>
>>
>>
>>Thanks, it said "uniqness of index indexname violated". This a good clue of what is going on.
>>
>>The command
>>
goto to bottom in tablename
>
>The record could be deleted, but you would still have an error if the key value already exists in a table. What do you use for your index and how do you generate it?

I use a function defined as
FUNCTION NEXTNO
LPARAMETER lcNumStr
RETURN PADL(ALLTRIM(STR(VAL(lcNumStr) + 1)), LEN(lcNumStr), '0')
The problem is that I am not passing the last value in the table because it is not going to the last record in table (in this case it is going to the next to last record).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform