RE: Problem saving blob to a record
Created a new DB and did this with no problem. Created a record and saved it. READ WRITE([Table_1]) ALL RECORDS([Table_1]) FIRST RECORD([Table_1]) // only one $TemplateFilePath_t:=Select document("";"";"Select a document:";0) If (OK=1) SET BLOB SIZE([Table_1]Field_1;0)// don't really need this but it doesn't hurt $TemplateFilePath_t:=document DOCUMENT TO BLOB($TemplateFilePath_t;[Table_1]Field_1)// the field now contains the 76Kb doc SAVE RECORD([Table_1])// you didn't show this but you have it I'm sure End if Calling the record again the field contains 76kb I suspect the record is not being saved. Do you have On Error running and it is maybe trapping the 4D error and you are not displaying it? Been there. Cheers Jim Labos - infobase - Jim Labos - infobase -- View this message in context: http://4d.1045681.n5.nabble.com/Problem-saving-blob-to-a-record-tp5748862p5748880.html Sent from the 4D Tech mailing list archive at Nabble.com. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Problem saving blob to a record
Record is definitely unlocked and table is read/write. -- Message: 3 Date: Sun, 20 Nov 2016 18:32:19 + From: "Dennis, Neil" <neil.den...@umb.com> To: "4d_tech@lists.4d.com" <4d_tech@lists.4d.com> Subject: RE: Problem saving blob to a record Message-ID: <838740227206e84f82973ff5d9ea59b74a765...@wsys6041a.umb.corp.umb.com> Content-Type: text/plain; charset="utf-8" After this is run the OK variable is 1 and the size of the blob field is 19 Ko. When I save the record, unload it, then go back into it the blob size is 0. Why? Is your [Constants] record locked? Ensure your table is set to read write before the record is loaded, also ensure that no other process/client has the record locked. Neil --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Problem saving blob to a record
> After this is run the OK variable is 1 and the size of the blob field is 19 > Ko. > When I save the record, unload it, then go back into it the blob size is 0. > Why? Is your [Constants] record locked? Ensure your table is set to read write before the record is loaded, also ensure that no other process/client has the record locked. Neil -- Privacy Disclaimer: This message contains confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this email. Please delete this email from your system and notify the sender immediately by replying to this email. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. The Alternative Investments division of UMB Fund Services provides a full range of services to hedge funds, funds of funds and private equity funds. Any tax advice in this communication is not intended to be used, and cannot be used, by a client or any other person or entity for the purpose of (a) avoiding penalties that may be imposed on any taxpayer or (b) promoting, marketing, or recommending to another party any matter addressed herein. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **