Type "Binary" not supported

reijermolenaarreijermolenaar Member Posts: 256
Hi,

When I compile an object I get the following warning:
Type "Binary" not supported
I use a variable of type Binary to read one bit from a stream like this:
InStr.READ(Bin1);
Does anybody know how I can do this without the use of a binary?
Reijer Molenaar
Object Manager

Comments

  • kinekine Member Posts: 12,562
    Use Char. You will read 8 bits, you can extract the bits by "div 2" and "mod 2".
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • reijermolenaarreijermolenaar Member Posts: 256
    Hi Kine,

    Thanks, but that will be dramatic for the performance.


    I will try to explain what I am doing…

    I have a file (a kind of a backup file) with data in it. It also includes the values of blobfields. So when I import this file I have to transfer parts of this instream in different blob fields. (e.g. item.picture)

    Now when I want to transfer 1000 bytes from that InStream to an OutStream I do the following:
    InStr.READ(Bin1000);
    OutStr.WRITE(Bin1000);
    
    If I have to use a Char to do this like this it will be very slow:
    FOR i := 1 TO 1000 DO BEGIN
      InStr.READ(Char1);
      OutStr.WRITE(Char1);
    END;
    
    Let me rephrase my question:

    What is the fastest way to transfer a variable no. of bytes from one stream to another?

    Thanks for your time!
    Reijer Molenaar
    Object Manager
Sign In or Register to comment.