Create a Binary File in eVB From a BLOB SQL CE Column

Create a Binary File in eVB From a BLOB SQL CE Column

Post by David Morga » Wed, 19 Sep 2001 23:19:30



Hello

I have a binary file stored in a table that I have replicated successfully
down to the device.  What I need to do is extract that 'file' from the table
and create it 'on disk', so to speak.

My understanding of this is obviously lacking, and I have tried this...

    oFile.Open "\Program Files\FileName.new", fsModeBinary,
fsAccessReadWrite, fsLockShared
    oFile.Put
mrstTemp.Fields.Item(0).GetChunk(mrstTemp.Fields.Item(0).ActualSize)
    oFile.Close

...which creates a 53k file, when the original was 800k, that of course is
not recognised by the target application.

I have been investigating the standard VB methods of doing this...

   Open "\Program Files\FileName.new" For Binary Access Write Shared As #1

... which just gives a compile error before the word 'For'.

Any help would be gratefully appreciated.

Thanks.