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:
01391053
Views:
68
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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform