Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong here?
Message
From
08/06/1999 15:20:31
 
 
To
08/06/1999 15:13:22
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00227589
Message ID:
00227622
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform