Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make a cursor updatable
Message
From
06/08/2000 15:10:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Make a cursor updatable
Miscellaneous
Thread ID:
00401674
Message ID:
00401674
Views:
75
I'm running a select that I need to be updatable. This is the code:


SELECT inventory.stocknum AS stocknum;
FROM Tomparco!inventory AS inv_this_trans;
INTO CURSOR inv_this_trans;
WHERE inv_this_trans.trans_id = trans_num; &&trans_num is a variable
ORDER BY inv_this_trans.stocknum

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if I run the following, I get the error "cannot update the cursor"

DBSETPROP('inv_this_trans','view','tables','Tomparco!inventory')
DBSETPROP('inv_this_trans','view','SendUpdates','Tomparco!inventory')
DBSETPROP('inv_this_trans.stocknum','field','keyfield',.T.)
DBSETPROP('inv_this_trans.stocknum','field','updatename','inventory.memotxt')
DBSETPROP('inv_this_trans.stocknum','field','updatable',.T.)

if I run the following instead, I get the error "Property invalid for table cursors" on sendupdates

CURSORSETPROP('sendupdates',.T.,'inv_this_trans')
CURSORSETPROP('keyfieldlist','stocknum','inv_this_trans')
CURSORSETPROP('tables','Tomparco!inventory','inv_this_trans')
CURSORSETPROP('updatenamelist','memotxt','inv_this_trans')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

APPEND BLANK IN inv_this_trans


Because of the errors, I'm wondering if I should be using DBSETPROP() or CURSORSETPROP(), and just what I need to do to make this select updatable? All advice is welcomed.

Thanks
JD
Next
Reply
Map
View

Click here to load this message in the networking platform