Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ed Rauh's APIRUN
Message
De
07/09/2003 17:48:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00826794
Message ID:
00826902
Vues:
26
I am using Version 10.5

How do I know the transfer worked:
Here is my code:
LPARAMETERS tiBusLocID as Integer,tlAndWait as Boolean 
IF VARTYPE(tiBusLocID )="L"
	tiBusLocID =2
ENDIF 

#DEFINE CL_STORE ["C:\Program Files\Symantec\pcAnywhere\awrem32.exe" ]

CLOSE DATABASES  ALL 
lcStoreAW=[ "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Store]+TRANSFORM(tiBusLocID)+[_ToHQ.CHF"]

lccommandline = ["C:\Program Files\Symantec\pcAnywhere\awrem32.exe" "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Store2_ToHQ.CHF"]
*lcCommandLine	= CL_STORE + lcStoreAW
ox=NEWOBJECT( "api_apprun", "modules\process", "", lcCommandLine)
IF tlAndWait 
	ox.LaunchAppAndWait()
ELSE 
	ox.LaunchApp()
ENDIF 

ox=null
and the portion calling this routine:
IF TransferFromStore(liStoreID)
	** transfer went OK
	** delete the xfer tables
	DELETE FILE ("ToHQ\SO_hq.dbf")
	DELETE FILE ("ToHQ\SO_hq.fpt")

	DELETE FILE ("ToHQ\SOITEM_hq.dbf")

	DELETE FILE ("ToHQ\FINXN_hq.dbf")

	DELETE FILE ("ToHQ\CDRAWER_hq.dbf")
	DELETE FILE ("ToHQ\CDRAWER_hq.fpt")

	DELETE FILE ("ToHQ\CCheck_hq.dbf")

	DELETE FILE ("ToHQ\INVOICE_hq.dbf")

	DELETE FILE ("ToHQ\audit_hq.dbf")
	DELETE FILE ("ToHQ\audit_hq.fpt")

ELSE 
	MESSAGEBOX(MESSAGE_BAD_TRANSFER,4096+48,"Transfer Error",10000)
ENDIF 
ANd the problem is if I just let AW run without the wait It is still connecting while VFP is already deleting the files.
Thats why I youe Ed's method
But that needs user intervention.
I would pefer FTP but the client does not have internet connection and IIS
Is there another, better way to accomplish what I am trying to do?

By the way are you going to Milwaukee??
Peter

>>Hi Rick,
>>Thanks alot.
>>
>>Do have any experience with pcAnywhere? I would like to make ths filetransfer as invisible to the user as possible?
>>Any pointers. The manual on OLE Automation is no help to me.
>>
>>Peter
>
>I've used pcAnywhere on the desktop for several versions, but I've always done file transfers manually and am only beginning to play around with automating it. I'm speculating here, but it looks like if you set up an Auto Transfer File in your connection properties and mark it to 'run upon connection', then run your connection with Ed's API_AppRun like we just talked about, that should do it.
>
>I'm using pcAnywhere version 10.5, BTW. pcAnywhere version 11.0 has a new feature called Command Queue that looks like it is designed to facilitate sending files, among other things, so that appears to be another alternative if you have or are considering version 11.0.
>
>There is also OLE automation - Tracy Holzer posted a solution to this a while ago in thread #578881 message #626693 that looks real promising too.
>
>-Rick
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform