Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(2023) value within an alias not reliable?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00774273
Message ID:
00774348
Vues:
15
Leeroy,

Try to rearrange your code.
THISFORM.FILEUAC = Alltrim(mxopid)+SUBSTR(SYS(2015), 3, 10)

IF USED(THISFORM.FILEUAC)
	USE IN(THISFORM.FILEUAC)
ENDIF
IF USED("UACQuery" )
	USE IN UACQuery
ENDIF

SELECT 0
CREATE TABLE (AddBS(Sys(2023))+THISFORM.FILEUAC) FREE (UAC C(03), LOB C(03) )
USE (DBF()) ALIAS UACQuery EXCLUSIVE
INDEX ON UAC TAG UAC
SET ORDER TO UAC
>After months of working correctly, some workstations are failing.
>
>THISFORM.FILEUAC = Alltrim(mxopid)+SUBSTR(SYS(2015), 3, 10)
>	
>SELECT 0
>CREATE TABLE (AddBS(Sys(2023))+THISFORM.FILEUAC) FREE (UAC C(03), LOB C(03) )
>	IF USED(THISFORM.FILEUAC)
>		SELECT (THISFORM.FILEUAC)
>		USE
>	ENDIF
>	USE (AddBS(Sys(2023))+THISFORM.FILEUAC) IN 0 ALIAS UACQuery EXCLUSIVE
>		SELECT UACQuery
>		INDEX ON UAC TO (AddBS(Sys(2023))+THISFORM.FILEUAC)
>		SET INDEX TO (AddBS(Sys(2023))+THISFORM.FILEUAC)
>
>Seems like the stored path in the alias is changing between the excution of the USE and SELECT commands?
>
>The file is created sucessfully, the use of the new file works, but the SELECT UACQuery is wrongly pointing to a different directory than that of the USE command???
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform