Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid question
Message
De
02/08/2000 15:17:36
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
À
02/08/2000 15:02:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00399587
Message ID:
00400000
Vues:
12
>>>>Can a grid hold data without a recordsource?
>>>
>>>No. From your other thread, it sounds like you need an empty cursor to store your "new" records into, and then add them to the existing database when appropriate.
>>
>>I already have a cursor open that fits that description. What would I need to do to clear the contents and make it ready for accepting values entered into the form? Here's the code:
>>
>>SELECT LEFT(SUBSTR(Inventory.p_descript,1,AT("$",Inventory.p_descript,2)+8),50) AS memotxt, Inventory.item_status,;
>> Inventory.trans_id, Inventory.stocknum;
>> FROM tomparco!inventory ;
>> INTO CURSOR trans_items ;
>> WHERE Inventory.trans_id = trans_num ;
>> ORDER BY Inventory.stocknum
>>
>>Thanks
>>JD
>
>You need a writable cursor of the same structure, not one from a SQL SELECT. Or you can make the SQL SELECT one writable by doing:
>
>USE (DBF('trans_item')) AGAIN IN 0 ALIAS newalias
>
>Now you can ZAP this cursor, add new records, whatever you need, after you do a USE IN trans_item to close the original alias first.

Like this?:

USE (DBF('trans_item')) AGAIN IN 0 ALIAS newaliasname
USE IN trans_item
ZAP IN newaliasname && I wasn't sure whether to zap in trans_item or newalias
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform