I am running a retrieve and report and then need to FTP that file. I have it working when I am in single user on my Dev machine, however I need help understanding how to deal with the file on the server side when using @Insert()
The code below generates the file and in multi user it places the file on the server in C:\sesame but the @Insert() is looking for it on the client. so it does not get the data to send properly.
What is the proper method to deal with this?
My Mickey Mouse / Rube Goldberg thought was to create a batch file that copies or moves the file from the server to a shared drive and have @Insert() read it from there.
Thanks
Subroutine sendftptoMach()
var vFile as String
var vSource as String
vSource = @Insert("C:\sesame\OrderMonthDat.txt")
Ftp("
www.placegoing.com", "username", "Password", "OrderMonthDat.txt" , Vsource)
If @Error Then
{
@Msgbox("The send failed", "", "friggin try something else")
}
End subroutine
Var VStr as string
var vRun as Int
// Loads an already saved retrieve spec for use
vStr = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_RETRIEVE, "OrdersMonth")
// Runs the currently loaded retrieve spec
vStr = @SpecCommand(SPEC_OPERATION_RUN, SPEC_TYPE_RETRIEVE, "")
// Loads an already saved sort spec for use
//vStr = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "RepStatRef")
// Runs the currently loaded sort spec
//vStr = @SpecCommand(SPEC_OPERATION_RUN, SPEC_TYPE_SORT, "")
If @Mode() = 1
{
vRun = @LoadExportSpec("webexp1")
If vRun = 1
{
RunExportSpec("c:\Sesame\OrderMonthDat.txt",",","",0,1,0,1,0,1,0,0)
// Clears the current retrieve spec
vStr = @SpecCommand(SPEC_OPERATION_CLEAR, SPEC_TYPE_RETRIEVE, "")
// Run subroutine to FTP data to a file on web server
sendftptoMach ()
}
}