Subject Re: PDF IN TABLE
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Thu, 18 Jan 2018 04:58:58 -0800
Newsgroups dbase.getting-started

On 1/17/2018 9:25 PM, Ken Mayer wrote:
> On 1/17/2018 6:59 PM, Denis Arguedas wrote:
>> DEAR ALL,
>>
>> WHEN I ADD A FIELD TO THE TABLE AS A BINARY ALONE IT ALLOWS ME TO
>> SELECT IMAGE OR SOUND, I NEED HELP TO LOAD A PDF FILE IN THE TABLE,
>> ATTACHED IMAGE
>
> I don't believe you can. You can put the path to where the file is, and
> store it externally, but you cannot store it in the table.
>

I had forgotten that you *can* do it, but as Ronnie points out, it's not
a good idea, and he explains why ... heed his comments. You could lose
all those files if the .DBT file gets corrupted or something. You are
better off not storing them in the table. In addition to Yiannis notes,
the OODML version is to use methods of the field object:

    replaceFromFile() will store a file to a binary field
    copyToFile() will bring it back out.

However, there is no way to empty the binary field except to use
replaceFromFile() to overwrite what's there with a small, blank file ...

Ken


--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm