Link to home
Start Free TrialLog in
Avatar of Andy1
Andy1

asked on

Using Internet Transfer Control the GetChunk returns 'junk' data

I'm working in access 2003 using the Microsoft Internet Transfer Control ActiveX control and I've run the

Execute.DIR myfile

to see if a file exists on the site...

using the GetChunk to get the returned data I am getting the file name of the file (when it exists) followed by four squares (unknown symbols?) of junk data.

if display the results in a msgbox the junk characters dont print, but how do I remove them so i can evaluate the data in code?

I dont want to just remove the last 4 characters, cause i dont know what they are or if there will always be just 4 junk characters?

In VB I would use something like:

RetreivedData = Left$(RetreivedData , InStr(1, RetreivedData , Chr$(0)) - 1)

But that doesn't seem to want to work for me...

Any help greatly appreciated :)

Cheers,

`Andy
Avatar of rockiroads
rockiroads
Flag of United States of America image

an example of its use can be found here

http://www.vb-helper.com/howto_inet_getchunk.html

Looks like u should use the StateChanged method

http://www.vbip.com/itc/itc-http-progress-01.asp
ASKER CERTIFIED SOLUTION
Avatar of xizor
xizor
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andy1
Andy1

ASKER

Thanks, that was it exactly!!

Cheers!