Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid question
Message
De
02/08/2000 15:02:41
 
 
À
02/08/2000 14:55:29
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00399587
Message ID:
00399988
Vues:
11
>>>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.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform