Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETFLDSTATE function clarification on use
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01391052
Message ID:
01391061
Views:
43
OK, that explains the error. Now how would you try to trap it?
i.e lets say I have a grid, that has as its control source a view of a table that is table bufferred. The user, has three records prior to adding some new ones.
The user adds 4 new records. If the user tries to delete one of the original ones, the error occurs.

Do I need to commit the changes, prior to deletion of one of the original ones? or how do allow the user to do this?

I hope I'm not confusing you.
TIA,
Mike


>Michael,
>
>GetFldState affects just one record.
>
>You may want to use GetNextModified function to get all changes.
>
>Bellow is the example:
>
>
>lnNextModified = GETNEXTMODIFIED(0,m.lcAlias)
>
>* Code from Marcia Akins  #941853
>	DO WHILE lnNextModified # 0
>		GO m.lnNextModified IN ( m.lcAlias )
>		lcFldState = NVL(THIS.GetFieldState(-1, m.lcAlias),"") && NVL( GETFLDSTATE( -1, m.lcALias ), '' )
>		IF NOT EMPTY( CHRTRAN( lcFldState, '13', '' ) )
>*** Change is real - exit stage left
>			llIsChanged = .T.
>			EXIT
>		ENDIF
>
>		lnNextModified = GETNEXTMODIFIED(m.lnNextModified,m.lcAlias)
>
>	ENDDO
>
>>Is the GETFLDSTATE function apply to all records in the table when called, or is it just for the record we are on?
>>
>>i.e. if I add a bunch of records in a table buffered mode, and then go back and delete a record how do I trap for the error "table has uncommitted changes".
>>
>>I have a list of records, that are already there, let say 2. I then add three new ones. If I go to one of the original ones, and try to delete it the above error occurs.
>>
>>Any ideas?
>>
>>TIA,
>>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform