Options

import binary data from webservices and create a local file

didierdidier Member Posts: 2
edited 2011-12-15 in NAV Three Tier
Hello
This my first post sorry for my poor english.

I receive binary data encoded in base 64 from a webservice and I would like to create the a new local file with the data.
(The final solution is received binary data, create local file with this binary data and add to record link)
Data is received in a variable bigText, i ve create a function :

CreateDoc(flowin bigtext,filename text(250))

CREATE(AdoStream);
AdoStream.Type := 2;
AdoStream.Open();
AdoStream.Write(flowin);
AdoStream.SaveToFile('c:\temp\'+filename);
AdoStream.Close();
CLEAR(AdoStream);

And the error is :
Call failed Member Write: The arguments are the wrong type, out of acceptable range or in conflict with each other.

Other solutions? import in blob?

What's wrong?
Thank you in advance

Comments

  • Options
    kinekine Member Posts: 12,562
    Make stream from the BigText, decode it, write it into file. WHere is the problem? :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.