Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oleboundcontrol and General field
Message
 
To
29/09/2006 11:58:35
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01158167
Message ID:
01158173
Views:
27
>Hello,
>
>I have a table with a general field which contains a PDF file.
>I'm able to 'Open' that PDF file by using this code:
>
>
>objectdoc=SUBSTR(SYS(2015), 3, 8)                   && Getting a name for the object
>thisform.AddObject("&objectdoc","oleboundcontrol")  && Adding the object to the form
>SELECT pdfc                                         && table which has the general field that contains the PDF file
>objectdoc="&objectdoc"+"."
>thisform.&objectdoc.ControlSource="pdfc.pdfgeneral"
>thisform.&objectdoc.AutoSize=.t.
>thisform.&objectdoc.Visible=.f.
>thisform.&objectdoc.AutoActivate= 0
>thisform.&objectdoc.DoVerb('Open')
>
>
>My problem is, I do not know how to SAVE that PDF file that is in the general field to "c:\" drive so that I can either
>"Print" it or "attach" it to outlook email.
>
>
>I realy appreciate it if any one can help me out. I have tried everything but no luck.
>
>Thanks
>
>Bob


I don't know how many times I read similar posts, about Genearl fields and some info in them.
Tore will support me :-)))

DO NOT USE GENERAL FIELDS!

You asking for trouble with them. Imagine what will happens if your table become corupted.
Also you will reach 2GB limit very soon.
Save only path to that file in Char or Memo field. If your application woks in shared environment you easily can copy user choosen documents to some folder where all users of your application have access.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform