Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReceiveFile doesn't work in vba

Status
Not open for further replies.

wche

Technical User
Jul 30, 2014
5
0
0
US
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!
 
Hi,

So when you open VB Help in Extra, what information do you get for FileTransfer?
 
Sorry, not sure I can get any VB Help in Extra. I tried to search it but no coding is found. Can you be more descriptive? Thanks!
 
What does Extra VB Help say about FileTransfer or ReceiveFile?

If it says nothing, then these methods are not available in Extra VB.
 
My company is upgrading to Window 7 with Attachmate 7.11. I used to have Attachmate 8.0. The FileTransfer and ReceiveFile codes all works in version 8.0 (Extra X-treme) but somehow not working in version 7.11 (MyExtra Enterprise). In version 7.11, these lines of codes still go through and return with a 'True' result, it just not run the download process. Any idea????
 
If you can't find an object, property, method in your VB reference, then it does not exist in your version.
 
Both FileTransfer and ReceiveFile are in the dropdown preperty list of the object session.

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)



 
DH = objSys.ActiveSession.ReceiveFile(rs("fsfdp") & ", " & rs("NAME") & ".txt", sDataSet, 0)

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
 
Public mysession As EXTRA.ExtraSession
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.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top