Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make a cursor updatable
Message
De
06/08/2000 15:10:38
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Make a cursor updatable
Divers
Thread ID:
00401674
Message ID:
00401674
Vues:
76
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform