Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmaticaly addrow to grid and deleterow from grid
Message
From
24/10/2002 05:10:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00714250
Message ID:
00714717
Views:
31
>Thanks for the reply Ed,
>would you like to put some codes here ?

I don't have anything handy, but I think you'd have no trouble using GETFLDSTATE() working from the example in the OnLine Help system, which demonstrates how to check if a record was added or fields in the record have been altered. GTEFLDSTATE() can tell you on a field-by-field basis if the record is an existing record or appended without posting through to the table and whether or not the content has been changed. A record has been appended and not changed if it's all 3's:
SET MULTILOCKS ON
CREATE CURSOR Temp (field1 i, field2 i)
=CURSORSETPROP('Buffering',5,'Temp')
APPEND BLANK
? GETFLDSTATE(-1)
REPLACE field1 WITH 4
? GETFLDSTATE(-1)
An unmodified, appended record would return a length of 0 if it were all '3's
?  IIF(LEN(STRTRAN(GETFLDSTATE(-1),'3',''))=0,'Unmodified and appended','something else')
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform