Re: included file; blob data

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Paul Pedersen (no-reply_at_swen.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 14:08:25 -0800

I cannot copy an included file to disk. (Maybe a VFP9 problem?) Please see
my response to Leonid.

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:OOe8jP%233EHA.1524@TK2MSFTNGP09.phx.gbl...
> An embedded file can be copied out to a disk file. You are right,
> soundplayer control needs a physical file, it can't use the embedded file.
>
> COPY FILE yourfile.ext TO x:\somepath\yourfile.txt
>
> this works with an embedded file for me, the file does not exist on the
> disk after the .EXE was built, but the .EXE copies it from internal to a
> physical file for me and then it does exist.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Paul Pedersen" <no-reply@swen.com> wrote in message
> news:Ohvdwx73EHA.2316@TK2MSFTNGP15.phx.gbl...
>>I compiled to an exe and put it in a separate folder. Search path is set
>>within the app to "". FILE("mysound.wav") returns .T.
>>
>> Actually, I don't really want to write that file to disk; I only want to
>> play it, but I can't get the soundplayer control to play it unless it's a
>> file.
>>
>>
>>
>> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
>> news:uoKt9oy3EHA.1296@TK2MSFTNGP10.phx.gbl...
>>> Are you sure that FILE() just isn't finding your file somewhere along
>>> the VFP PATH?
>>>
>>> --
>>> Fred
>>> Microsoft Visual FoxPro MVP
>>>
>>>
>>> "Paul Pedersen" <no-reply@swen.com> wrote in message
>>> news:ePhqXRy3EHA.1192@tk2msftngp13.phx.gbl...
>>>> Yeah, I guess I'll just keep it in a binary memo. (COPY MEMO works
>>>> fine.) Seems a little kludgey, but it works.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>> "Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
>>>> news:eqZ8Xhx3EHA.2572@tk2msftngp13.phx.gbl...
>>>>> "Paul Pedersen" <no-reply@swen.com> wrote in message
>>>>> news:%23UxMLHx3EHA.3336@TK2MSFTNGP11.phx.gbl...
>>>>>> (1) My application needs to write a (fixed) wav file to disk. I tried
>>>>>> including the file in the build, but that did not work. Even though
>>>>>> FILE("mysound.wav") returns .T., COPY FILE mysound.wav TO
>>>>>> tempdir\mysound.wav fails with "file not found".
>>>>>
>>>>> In situations like this, I always store the file in an included table
>>>>> with a binary memo field. I then use STRTOFILE() to save it to disk.
>>>>> Sorry, I have not yet tried a blob field for things like this, but I
>>>>> think it shouldn't be a problem to use BLOB rather than binary memo.
>>>>> Just use STRTOFILE() to save it to disk and STRTOFILE() to get it in
>>>>> the db.
>>>>> --
>>>>> Eric den Doop
>>>>> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By
>>>>> VFP8
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Relevant Pages

  • Re: included file; blob data
    ... An embedded file can be copied out to a disk file. ... soundplayer control needs a physical file, it can't use the embedded file. ... I guess I'll just keep it in a binary memo. ...
    (microsoft.public.fox.programmer.exchange)
  • Saving embedded object to disk
    ... I'm storing an Access database as an embedded object on a worksheet, ... and I want to programmatically save a copy of the embedded file to ... disk in its native file format. ...
    (microsoft.public.excel.programming)
  • Re: Play wav from embedded file
    ... I've managed to display a bitmap from an embedded file, however i can't seem to figure how to play a wav file from an embedded file. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Play wav from embedded file
    ... Best regards, ... I've managed to display a bitmap from an embedded file, however i can't seem to figure how to play a wav file from an embedded file. ...
    (microsoft.public.dotnet.framework.compactframework)