Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to refrence location from data field.
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00908935
Message ID:
00908944
Vues:
12
This message has been marked as the solution to the initial question of the thread.
Hi Ryan,

You've to trim path you get from table because it may be padded with spaces. I'm not sure if 'updatepath' includes file name or not. Also, tt's better to use name expression instead of macro substitution.
SELECT CONFIG_INFO
updatepath = ADDBS(CONFIG_INFO.update_path)
fileName = 'FM.exe'
Filepath = ADDBS(CONFIG_INFO.exe_path)
FullFile = Filepath + fileName

IF FILE(FullFile, 1)
	=AGETFILEVERSION(localversion, FullFile)
	=AGETFILEVERSION(networkversion, updatepath )
	LocalProduct_Version = localversion(4)
	NetworkProduct_Version = networkversion(4)
	IF LocalProduct_Version < NetworkProduct_Version
		nAnswer = MESSAGEBOX("Update Version =" + ' ' + NetworkProduct_Version  + CHR(13) + ;
"Current Version = " + ' ' + LocalProduct_Version + CHR(13) + CHR(13) + ;
'Do you want to update your version ?',;
4,'Product Version Info')
		IF nAnswer = 6
			DELETE FILE (FullFile)
			COPY FILE (updatepath) TO (FullFile)
		ENDIF
	ENDIF
ELSE
	COPY FILE (updatepath) TO (FullFile)
ENDIF
DO (FullFile)

QUIT
>I have an application that I use to verify the latest version of an application. The following code works great "IF" I hard code the locations, I can not get it to work with it looking up the file locations in my config_info table, any ideas ?
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform