Problem saving blob to a record

2016-11-19 Thread David Rose
In a Windows 7 v15 database I need to save an existing Excel workbook as a 
blob in a 4D record. I created a blob field and selected the "In record" 
option for storage.


I ran this code:

$TemplateFilePath_t:=Select document("";"";"Select a document:";0)
If (OK=1)
   SET BLOB SIZE([Constants]D_And_B_Excel_Template;0)
   $TemplateFilePath_t:=document
   DOCUMENT TO BLOB($TemplateFilePath_t;[Constants]D_And_B_Excel_Template)
End if

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?

David 



---
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: 4D backup

2016-11-19 Thread Peter Mew
Thank you Douglas for pointing me in the right direction
The answer was to use
OPEN SETTINGS WINDOW("/Database/Backup/;true)
This opens the backup window with the 3 tabs exactly as in the design
environment.
Thanks
again
-pm

On Fri, Nov 18, 2016 at 11:45 PM, Arnaud de Montard  wrote:

>
> > Le 19 nov. 2016 à 00:10, Peter Mew  a écrit :
> >
> > Hi
> > I have a v13 standalone app, to which I would like to add the ability
> for the user to schedule their own 4D backups.
> > I can't find anything in the language to make this possible.
> > I want to Create a form where the user can choose when the backup
> happens, how often, where the backup is stored etc. Basically all the
> things that the designer can set up in the design environment.
>
> Backup settings are in the xml file located here:
>   ..DBfolder/Preferences/Backup/Backup.xml
> You just have to use XML command to read / write this file.
> Full description of the options are here:
>  >
>
> In C/S configuration, Backup.xml is on the server but a method with the
> "execute on server" (EoS) attribute allows to read or write the file
> easily, see here (old example):
> 
> Even if it's for a standalone app now, EoS will be useable if needed in
> C/S…
>
> --
> Arnaud de Montard
>
>
> **
> 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
> **
>
**
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: Date Question...

2016-11-19 Thread Peter Bozek
On Sat, Nov 19, 2016 at 8:15 PM, Alan Chan  wrote:

> Anyway, if fixed date is really required for any reason, use
> internationally recognizable "-MM-DD". Your app would work regardless
> regional settings your users are using.
>

As I need my app working in several different locale settings (US, English,
German, Swiss), if I need a fixed date, I use Add to date call to construct
it (with a wrapper.)

-- 

Peter Bozek
**
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: Date Question...

2016-11-19 Thread Alan Chan
I forgot 4D doesn't do that, my code did that. I apologized for the confusion.

Simply use Add to date(!00/00/!;year;month;day)

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>Anyway, if fixed date is really required for any reason, use internationally 
>recognizable "-MM-DD". Your app would work regardless regional settings 
>your users are using.

**
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: Date Question...

2016-11-19 Thread Alan Chan
For us, we seldom hardcode any fixed date in any applicaiton and I peronally 
couldn't see why it's needed (enlighten me please) except something like sales 
on christmas date/week. Most of cases, reporting will be based on past 5/7/10 
days,
months/years, period to period.

Anyway, if fixed date is really required for any reason, use internationally 
recognizable "-MM-DD". Your app would work regardless regional settings 
your users are using.

Alan Chan 

4D iNug Technical <4d_tech@lists.4d.com> writes:
>What do you use instead of date constants to specify a specific date in code?

**
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: Pluggers Software releases NTK Plugin 3.0

2016-11-19 Thread Rob Laveaux

> On 18 Nov 2016, at 22:02, Tom Swenson  wrote:
> 
> Is this the same NTK things you showed at the March 2, 2016 4D Method User 
> Group google hangout?


Yes it is, just a much improved version with a lot of refinements. Whilst I was 
writing the documentation and preparing the examples, I spend more time 
perfecting the features. And I enjoyed that creative process so much, ideas 
just kept coming.`

Which is also why I suggest to look through the documentation of the JavaScript 
framework and study the examples. It will make you appreciate how flexible 
JavaScript is as a programming language and how dynamic it can be at runtime.

- Rob Laveaux


Pluggers Software
Scholekstersingel 48
2496 MP  Den Haag
The Netherlands

Email: rob.lave...@pluggers.nl 
Website: http://www.pluggers.nl 





**
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
**