Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update table with grid and cursor
Message
From
16/04/2002 08:11:31
 
 
To
16/04/2002 07:55:34
Khurram Khan
Filtrona Pvt Ltd.
Karachi, Pakistan
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00645360
Message ID:
00645362
Views:
12
>I want that I retrieve records, change and again save in table.

>Select * from order where order_id=123 into cursro kk
>Thisform.Grid1.RecordSource="kk"
>but the Control of Grid is ReadOnly
>now How I change the Record and again save in table.

CURSORSETPROP([Buffering],3,[kk]) && enables optimistic row buffering on the cursor

The cursor can then be modified. Once this has been done, perform a GETFLDSTATE([kk]) and look for the fields that have been changed ('2'$GETFLDSTATE[kk]).

If these are present, perform an UPDATE ORDER SET field1 = kk.field1, field2 = kkfield2 etc... WHERE order.order_id = kk.order_id

Hope this helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform