Hi Hani
>I need to Access the Cursors in a DataEnviroment in a form, like changing the order of a cursor, how can I do that.
>Any Help ?
Cursors in a dataenvironment are actually two different things. First there is the "cursor object" that tells VFP how to locate and handle the data and this is what the DE object actually creates and manages. Second is the 'data cursor' which is the local representation of the underlying table.
Handling the data cursor is no different from handling tables, cursors or views, that you opened with a USE command. They exist in 'work areas' and have 'alias' names (by default these are the same as the source tables). In practice you can treat them as if the dataenvironment did not exist.
In other words, even if the table 'customer' is opened using the form's DataEnvironment you can still write code like this:
SELECT customer
SET ORDER TO cust_id
IF SEEK( 1234 )
lcName = customer.name
REPLACE name WITH lcNewName IN customer
ELSE
INSERT INTO customer (cust_id, name ) VALUES ( 1234, lcNewName )
ENDIF
----
Regards
Andy Kramek