Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid question
Message
From
02/08/2000 15:17:36
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00399587
Message ID:
00400000
Views:
14
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform