I have tried both the techniques but data lost while I test the program on two computers, I used the following simple coding:
xLoops = .t.
DO WHIL xLOOPs
@x,y say "Bill No " get mBill_No
@x,y say "Date " get mBill_Date
@x,y say "Party Name " get m_Cust_name
@x,y say "Item Name " get mItem_Name
@x,y say "Quantity " get m_qty
@x,y say "Total Amt. " get m_amount
Read
If Lastkey() = K_ESC
@23,1 say "Save, Cancel..."
Do while !chr(inkey(0))$"SsCc"+chr(K_ESC)+chr(K_RETURN)
Enddo
DO CASE
Case chr(lastkey())$"Ss" + chr(K_ENTER)
if bills->(Flock()) .and. data->(Flock())
Save_Data_Function()
Else
Retry procedure ...
endif
OtherWise
xLoops = .f.
ENDCASE
EndIf
ENDDO
Function Save_Data_Function()
*---------------------------*
Sele Bills
Appen Blan
Replace Bill_no with mBill_no, Bill_date with mBill_date
Sele Data
appen Blan
Replace Cust_name with mCust_Name, Quantity with m_Qty, ;
Amount with m_Amount
UnLock All
Return .t.
Just let me know what's wrong with these lines.
Thanks