Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you finsih this up for me -smily face-
Message
From
15/06/1999 16:02:23
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00230111
Message ID:
00230152
Views:
21
This is rather the "full version" (am I crazy, I guess my codings are not copyrighted!). I will look into what you code for me. If you don't mind, could you "re-do" this one, that way I can fix it faster (this was supposed to be due this week, man!). If you prefer do this out of UniversalThread, my email is CNT@bfs.uwm.edu, otherwise, here is fine (within limits?)...

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

SET SAFETY OFF
SELECT workpo
APPEND FROM poencr
REPLACE blanket WITH "BLKT" FOR blanket = "BLK"
REPLACE blanket WITH " " FOR blanket <> "BLKT"
GO TOP
SET DELETED ON
DO WHILE NOT EOF()
varpo = po
varclass = class
varfund = fund
varudds = udds
varamount = amount
varfy = fy
varactivity = activity
varaccount = account
COPY TO temp FOR po = varpo
DELETE FOR po = varpo
USE temp IN 0
SELECT temp
COUNT TO ct
IF ct = 1
SELECT histpo
SEEK varpo
IF FOUND()
COUNT FOR po = varpo
IF _tally = 1
SEEK varpo
IF class = varclass AND ;
fund = varfund AND ;
udds = varudds AND ;
amount = varamount AND ;
fy = varfy AND ;
activity = varactivity AND ;
account = varaccount
SELECT workpo
REPLACE which WITH "2"
ELSE
REPLACE class WITH varclass, ;
fund WITH varfund, ;
udds WITH varudds, ;
amount WITH varamount, ;
fy WITH varfy, ;
activity WITH varactivity, ;
account WITH varaccount
SELECT workpo
REPLACE which WITH "3"
ENDIF
ELSE (ct > 1)
wait window "HISTPO has > 1 records"
ENDIF
ELSE
SELECT workpo
REPLACE which WITH "1"
ENDIF
ELSE
wait window "TEMP has > 1 records"
SELECT histpo
SEEK varpo
IF FOUND()
COUNT FOR po = varpo
IF _tally = ct
SELECT temp
SEEK varpo
SELECT histpo
SEEK varpo
FOR i = 1 TO _tally
IF class = varclass AND ;
fund = varfund AND ;
udds = varudds AND ;
amount = varamount AND ;
fy = varfy AND ;
activity = varactivity AND ;
account = varaccount
SELECT temp
DELETE
ELSE

ENDIF
ENDFOR

ELSE

ENDIF
ELSE
*APPEND to HISTPO
SELECT workpo
REPLACE which WITH "3"
ENDIF
ENDIF

SELECT temp
USE
SELECT workpo
GO TOP
ENDDO

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
Today is tomorrow's yesterday.
Previous
Reply
Map
View

Click here to load this message in the networking platform