×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ReceiveFile doesn't work in vba

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!

RE: ReceiveFile doesn't work in vba

Hi,

So when you open VB Help in Extra, what information do you get for FileTransfer?

RE: ReceiveFile doesn't work in vba

(OP)
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!

RE: ReceiveFile doesn't work in vba

What does Extra VB Help say about FileTransfer or ReceiveFile?

If it says nothing, then these methods are not available in Extra VB.

RE: ReceiveFile doesn't work in vba

(OP)
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????

RE: ReceiveFile doesn't work in vba

If you can't find an object, property, method in your VB reference, then it does not exist in your version.

RE: ReceiveFile doesn't work in vba

(OP)
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)



RE: ReceiveFile doesn't work in vba

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

RE: ReceiveFile doesn't work in vba

(OP)
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.




Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close