ReceiveFile doesn't work in vba
ReceiveFile doesn't work in vba
(OP)
In the Attachmate 7.11, I am unable to transfer the report to my local drive. All line of codes successfully ran but just not downloading a copy of the report. This line of code 'ReceiveFile' is not execute properly somehow don't know why. Any help is highly appreciated!
Public mysession As EXTRA.ExtraSession
Public myscreen As EXTRA.ExtraScreen
Public objSys As EXTRA.ExtraSystem
Public objSessions As EXTRA.ExtraSessions
Dim DH As Boolean
mysession.FileTransferScheme = ("Text Default")
mysession.FileTransferScheme = ("C:\Program Files\Attachmate\E!E2K\Schemes\ENU\Text Default.eis")
mysession.FileTransferHostOS = (1)
'this line is not downloading the report???
DH = objSys.ActiveSession.ReceiveFile(rs("fsfdp") & ", " & rs("NAME") & ".txt", sDataSet, 0)
Thank you in advance!
Public mysession As EXTRA.ExtraSession
Public myscreen As EXTRA.ExtraScreen
Public objSys As EXTRA.ExtraSystem
Public objSessions As EXTRA.ExtraSessions
Dim DH As Boolean
mysession.FileTransferScheme = ("Text Default")
mysession.FileTransferScheme = ("C:\Program Files\Attachmate\E!E2K\Schemes\ENU\Text Default.eis")
mysession.FileTransferHostOS = (1)
'this line is not downloading the report???
DH = objSys.ActiveSession.ReceiveFile(rs("fsfdp") & ", " & rs("NAME") & ".txt", sDataSet, 0)
Thank you in advance!
RE: ReceiveFile doesn't work in vba
So when you open VB Help in Extra, what information do you get for FileTransfer?
RE: ReceiveFile doesn't work in vba
RE: ReceiveFile doesn't work in vba
If it says nothing, then these methods are not available in Extra VB.
RE: ReceiveFile doesn't work in vba
RE: ReceiveFile doesn't work in vba
RE: ReceiveFile doesn't work in vba
When it coded the following I got the error message of 'Error: Object variable or With block variable not set'
DH = mysession.ReceiveFile(rs("fsfdp") & ", " & rs("NAME") & ".txt", sDataSet, "")
then I changed to the following .. and it pass through but nothing happened.
DH = objSys.ActiveSession.ReceiveFile(rs("fsfdp") & ", " & rs("NAME") & ".txt", sDataSet, 0)
RE: ReceiveFile doesn't work in vba
Where did you set the instance of objSys?
Lots of unanswered questions. First, it seems that ReceiveFile is in your VB reference.
Then where is rs, I assume a RecordSet object (from what; an ADO access?).
What's the value of rs("fsfdp")
What's the value of & rs("NAME") & ".txt"
What's the value of sDataSet
RE: ReceiveFile doesn't work in vba
Public myscreen As EXTRA.ExtraScreen
Public objSys As EXTRA.ExtraSystem
Public objSessions As EXTRA.ExtraSessions
objSys declared earlier as global variable
rs is the recordset declared earlier connected from CurrentDb.OpenRecordset
rs("fsfdp") is the download path
rs("NAME") & ".txt" is the report name e.g. report.txt
sDataSet is the dataset name created in MyExtra holding the report in the memory.