Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is wrong here?
Message
De
08/06/1999 15:20:31
 
 
À
08/06/1999 15:13:22
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00227589
Message ID:
00227622
Vues:
22
Are you using table buffering? If so, try inserting a TableUpdate() before the APPEND.

HTH

>excuse me, but I am copy/paste the "whole" coding here, just look at it, if you find something could be improved or should be whatever, let me know...
>
>
>CLEAR
>SET MULTILOCKS ON
>
>leavenow=.F.
>SET ESCAPE OFF
>ON ERROR DO getout
>LOCAL laTables, lcTableName, lcKey
>OPEN DATABASE po EXCLUSIVE
>DIMENSION laTables[1]
>ADBOBJECTS(laTables, "TABLE")
>FOR EACH lcTableName IN laTables
> USE (lcTableName) EXCLUSIVE IN 0
> IF leavenow=.T.
> EXIT
> ENDIF
> SELECT (lcTableName)
> lcKey=TAG(1)
> SET ORDER TO &lcKey
>ENDFOR
>
>IF leavenow=.T.
> RETURN
>ENDIF
>SET ESCAPE ON
>ON ERROR
>
>*the remaining of the program starts right here...
>SELECT poencr
>APPEND FROM poencr.xls TYPE XLS
>GO TOP
>DELETE
>PACK
>
>SELECT workpo
>APPEND FROM poencr
>GO TOP
>DO WHILE NOT EOF()
> varpo = po
> varclass = class
> varfund = fund
> varudds = udds
> varamount = amount
> varfy = fy
> varactivity = activity
> varaccount = account
> SELECT histpo
> SEEK varpo
> IF FOUND()
> IF class = varclass AND fund = varfund AND udds = varudds AND ;
> amount = varamount AND fy = varfy AND activity = varactivity AND ;
> account = varaccount
>
> SELECT workpo
> REPLACE code WITH "2"
> ELSE
> SELECT workpo
> REPLACE code WITH "3"
> ENDIF
> ELSE
> SELECT workpo
> REPLACE code WITH "1"
> ENDIF
> SKIP
>ENDDO
>
>*****************************
>*** HERE IS THE PROBLEM *****
>*****************************
>
>SELECT histpo
>APPEND FROM workpo FOR ALLTRIM(workpo.code) = "1"
>SELECT delepo
>APPEND FROM workpo FOR ALLTRIM(workpo.code) = "3"
>REPLACE deleted with DATE() for deleted = {}
>*FLUSH <-- didn't work, as suggested, same with ALLTRIM either as above
>
>RETURN
>
>
>PROCEDURE getout
>CLOSE ALL
>WAIT WINDOW "The table(s) can not be open exclusively at this time, please try again later."
>leavenow=.T.
>RETURN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform