Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't update the input data finto the TABLE
Message
De
29/11/1999 04:50:36
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Can't update the input data finto the TABLE
Divers
Thread ID:
00296296
Message ID:
00296296
Vues:
75
I design order entry form to accept the input data. But
I have a problem in update the delete/insert record(s) into the table after close the windows/or through a EXIT FUNCTION
Is this any coding error in this two INSERT and DELETE functions.
Please help me to solve problem a.s.a.p.

The following is the coding of the INSERT FUNCTION

SELECT ODETAIL
lcOldTalk = SET("TALK")
SET TALK OFF
lcOldDeleted = SET("DELETED")
SET DELETED OFF
** Insert new record
APPEND BLANK
REPLACE odetail.orderno WITH Order.OrderNo IN odetail
*REPLACE order_id with lMaxID in orders
** Restore talk setting
SET TALK &lcOldTalk
SET DELETED &lcOldDeleted
SELECT ORDER
THISFORM.Refresh

**end of INSERT FUNCTION

The following is the coding of the DELETE FUNCTION

#DEFINE MSGBOX_YES 6
#DEFINE C_MSGBOX1 36
#DEFINE C_DELETE1_LOC "Are you sure you want to delete the order number "
#DEFINE C_DELETE2_LOC "?"
lcMessage = C_DELETE1_LOC + ALLTRIM(ODetail.OrderNo) +ALLTRIM(ODetail.StockNo)+ C_DELETE2_LOC
lcOrderID = Order.OrderNo
IF MESSAGEBOX(lcMessage,C_MSGBOX1) = MSGBOX_YES
SELECT ODETAIL
DELETE
IF !EOF()
SKIP 1
ENDIF
IF EOF() AND !BOF()
SKIP -1
ENDIF
THISFORM.Refresh
ENDIF

**END OF DELETE FUNCTION

Waiting for any advice.
Many thanks for any assistance.

Dennis
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform