Re: v13 - Record to Blob?

2018-07-31 Thread Plist via 4D_Tech

Hi Rudy,

Send Record
Document to Blob

is less work. :)


Peter


Am 31.07.18 um 17:18 schrieb Two Way Communications via 4D_Tech:

It’s fairly easy to write a method that loops through all the fields of the 
record and puts them into a blob. (variable to blob)

Then, on the other end, use same method but ‘BLOB to variable’

Works really well.


Rudy Mortier
Two Way Communications bvba




On 31 Jul 2018, at 16:11, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> wrote:


I considered this approach -
but the need is for data passing between processes, so writing to disk
is not really 'efficient'.

I went/am going with a simple convert it all to text approach.  The
data will not need to deal with blobs, or pictures so this will do for
now.



On Tue, 31 Jul 2018 09:54:44 +0200, Koen Van Hooreweghe via 4D_Tech
wrote:

Hi Chip,

No native command as you might have learned from the answers on your post.
Not too difficult to implement yourself. Below is what I've been
using for a long time.
I just noticed that I did not delete the intermediate disk document,
but if untouched, the files in the temporary folder are automatically
removed by the OS after three days (at least on macOS).

HTH
Koen

C_POINTER($1;$tablePtr)
C_BLOB($0)

$tablePtr:=$1

C_TEXT($path)

If (Records in selection($tablePtr->)#0)
$path:=Temporary folder+Generate UUID
SET CHANNEL(10;$path)
SEND RECORD($tablePtr->)
SET CHANNEL(11)

DOCUMENT TO BLOB($path;$0)

DELETE DOCUMENT($path) //added upon sharing code
Else
TRACE
End if



Op 30 jul. 2018, om 20:48 heeft Chip Scheide via 4D_Tech
<4d_tech@lists.4d.com> het volgende geschreven:

I do not see a command that allows this action (directly)
am I missing something, or do I need to write something?




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-31 Thread Chip Scheide via 4D_Tech
yes -
but I was mistaken about the end use..

end use is for archiving deleted records.
record formats may change, and blob data is not user readable


On Tue, 31 Jul 2018 17:18:03 +0200, Two Way Communications via 4D_Tech 
wrote:
> It’s fairly easy to write a method that loops through all the fields 
> of the record and puts them into a blob. (variable to blob)
> 
> Then, on the other end, use same method but ‘BLOB to variable’
> 
> Works really well.
> 
> 
> Rudy Mortier
> Two Way Communications bvba 
> 
> 
> 
>> On 31 Jul 2018, at 16:11, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> 
>> I considered this approach -
>> but the need is for data passing between processes, so writing to disk 
>> is not really 'efficient'.
>> 
>> I went/am going with a simple convert it all to text approach.  The 
>> data will not need to deal with blobs, or pictures so this will do for 
>> now.
>> 
>> 
>> 
>> On Tue, 31 Jul 2018 09:54:44 +0200, Koen Van Hooreweghe via 4D_Tech 
>> wrote:
>>> Hi Chip,
>>> 
>>> No native command as you might have learned from the answers on your post.
>>> Not too difficult to implement yourself. Below is what I've been 
>>> using for a long time.
>>> I just noticed that I did not delete the intermediate disk document, 
>>> but if untouched, the files in the temporary folder are automatically 
>>> removed by the OS after three days (at least on macOS).
>>> 
>>> HTH
>>> Koen
>>> 
>>> C_POINTER($1;$tablePtr)
>>> C_BLOB($0)
>>> 
>>> $tablePtr:=$1
>>> 
>>> C_TEXT($path)
>>> 
>>> If (Records in selection($tablePtr->)#0)
>>> $path:=Temporary folder+Generate UUID
>>> SET CHANNEL(10;$path)
>>> SEND RECORD($tablePtr->)
>>> SET CHANNEL(11)
>>> 
>>> DOCUMENT TO BLOB($path;$0)
>>> 
>>> DELETE DOCUMENT($path) //added upon sharing code
>>> Else 
>>> TRACE
>>> End if 
>>> 
>>> 
 Op 30 jul. 2018, om 20:48 heeft Chip Scheide via 4D_Tech 
 <4d_tech@lists.4d.com> het volgende geschreven:
 
 I do not see a command that allows this action (directly)
 am I missing something, or do I need to write something?
>>> 
>>> 
>>> 
>>> 
>>> Compass bvba
>>> Koen Van Hooreweghe
>>> Kloosterstraat 65
>>> 9910 Knesselare
>>> Belgium
>>> tel +32 495 511.653
>>> 
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing 
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-31 Thread Two Way Communications via 4D_Tech
It’s fairly easy to write a method that loops through all the fields of the 
record and puts them into a blob. (variable to blob)

Then, on the other end, use same method but ‘BLOB to variable’

Works really well.


Rudy Mortier
Two Way Communications bvba 



> On 31 Jul 2018, at 16:11, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> I considered this approach -
> but the need is for data passing between processes, so writing to disk 
> is not really 'efficient'.
> 
> I went/am going with a simple convert it all to text approach.  The 
> data will not need to deal with blobs, or pictures so this will do for 
> now.
> 
> 
> 
> On Tue, 31 Jul 2018 09:54:44 +0200, Koen Van Hooreweghe via 4D_Tech 
> wrote:
>> Hi Chip,
>> 
>> No native command as you might have learned from the answers on your post.
>> Not too difficult to implement yourself. Below is what I've been 
>> using for a long time.
>> I just noticed that I did not delete the intermediate disk document, 
>> but if untouched, the files in the temporary folder are automatically 
>> removed by the OS after three days (at least on macOS).
>> 
>> HTH
>> Koen
>> 
>> C_POINTER($1;$tablePtr)
>> C_BLOB($0)
>> 
>> $tablePtr:=$1
>> 
>> C_TEXT($path)
>> 
>> If (Records in selection($tablePtr->)#0)
>> $path:=Temporary folder+Generate UUID
>> SET CHANNEL(10;$path)
>> SEND RECORD($tablePtr->)
>> SET CHANNEL(11)
>> 
>> DOCUMENT TO BLOB($path;$0)
>> 
>> DELETE DOCUMENT($path) //added upon sharing code
>> Else 
>> TRACE
>> End if 
>> 
>> 
>>> Op 30 jul. 2018, om 20:48 heeft Chip Scheide via 4D_Tech 
>>> <4d_tech@lists.4d.com> het volgende geschreven:
>>> 
>>> I do not see a command that allows this action (directly)
>>> am I missing something, or do I need to write something?
>> 
>> 
>> 
>> 
>> Compass bvba
>> Koen Van Hooreweghe
>> Kloosterstraat 65
>> 9910 Knesselare
>> Belgium
>> tel +32 495 511.653
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-31 Thread Chip Scheide via 4D_Tech

I considered this approach -
but the need is for data passing between processes, so writing to disk 
is not really 'efficient'.

I went/am going with a simple convert it all to text approach.  The 
data will not need to deal with blobs, or pictures so this will do for 
now.



On Tue, 31 Jul 2018 09:54:44 +0200, Koen Van Hooreweghe via 4D_Tech 
wrote:
> Hi Chip,
> 
> No native command as you might have learned from the answers on your post.
> Not too difficult to implement yourself. Below is what I've been 
> using for a long time.
> I just noticed that I did not delete the intermediate disk document, 
> but if untouched, the files in the temporary folder are automatically 
> removed by the OS after three days (at least on macOS).
> 
> HTH
> Koen
> 
> C_POINTER($1;$tablePtr)
> C_BLOB($0)
> 
> $tablePtr:=$1
> 
> C_TEXT($path)
> 
> If (Records in selection($tablePtr->)#0)
> $path:=Temporary folder+Generate UUID
> SET CHANNEL(10;$path)
> SEND RECORD($tablePtr->)
> SET CHANNEL(11)
> 
> DOCUMENT TO BLOB($path;$0)
> 
> DELETE DOCUMENT($path) //added upon sharing code
> Else 
> TRACE
> End if 
> 
> 
>> Op 30 jul. 2018, om 20:48 heeft Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> het volgende geschreven:
>> 
>> I do not see a command that allows this action (directly)
>> am I missing something, or do I need to write something?
> 
> 
> 
> 
> Compass bvba
> Koen Van Hooreweghe
> Kloosterstraat 65
> 9910 Knesselare
> Belgium
> tel +32 495 511.653
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-31 Thread Koen Van Hooreweghe via 4D_Tech
Hi Chip,

No native command as you might have learned from the answers on your post.
Not too difficult to implement yourself. Below is what I've been using for a 
long time.
I just noticed that I did not delete the intermediate disk document, but if 
untouched, the files in the temporary folder are automatically removed by the 
OS after three days (at least on macOS).

HTH
Koen

C_POINTER($1;$tablePtr)
C_BLOB($0)

$tablePtr:=$1

C_TEXT($path)

If (Records in selection($tablePtr->)#0)
$path:=Temporary folder+Generate UUID
SET CHANNEL(10;$path)
SEND RECORD($tablePtr->)
SET CHANNEL(11)

DOCUMENT TO BLOB($path;$0)

DELETE DOCUMENT($path) //added upon sharing code
Else 
TRACE
End if 


> Op 30 jul. 2018, om 20:48 heeft Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
> I do not see a command that allows this action (directly)
> am I missing something, or do I need to write something?




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-31 Thread Arnaud de Montard via 4D_Tech

> Le 30 juil. 2018 à 21:56, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I thought about that...
> just wondering if there was something native I missed.

I use this:

It's old, needs to be adapted for object fields. 

-- 
Arnaud de Montard 




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-30 Thread John DeSoi via 4D_Tech
I think this would be very useful as a native command and trivial to implement 
(already in the plugin API, I think). If you agree, here is the feature request:

http://forums.4d.com/Post/EN/17757394/1/17757547

John DeSoi, Ph.D.


> On Jul 30, 2018, at 2:40 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> if you must use native commands only, then
> 
> http://doc.4d.com/4D-Language-Reference-17/Communications/SEND-RECORD.301-3729974.en.html
> http://doc.4d.com/4D-Language-Reference-17/BLOB/DOCUMENT-TO-BLOB.301-3730325.en.html

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-30 Thread Tim Nevels via 4D_Tech
On Jul 30, 2018, at 2:00 PM, Chip Scheide wrote:

> I do not see a command that allows this action (directly)
> am I missing something, or do I need to write something?

No 4D native command. You need Rob’s “API Pack” it has command to go "API 
Record to BLOB" and “API BLOB to Record"

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-30 Thread Chip Scheide via 4D_Tech
I thought about that...
just wondering if there was something native I missed.

again,
Thanks

On Mon, 30 Jul 2018 19:40:49 +, Keisuke Miyako via 4D_Tech wrote:
> if you must use native commands only, then
> 
> 
http://doc.4d.com/4D-Language-Reference-17/Communications/SEND-RECORD.301-3729974.en.html
> 
http://doc.4d.com/4D-Language-Reference-17/BLOB/DOCUMENT-TO-BLOB.301-3730325.en.html
> 
> 2018/07/31 3:48、Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> 
> I do not see a command that allows this action (directly)
> am I missing something, or do I need to write something?
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-30 Thread Keisuke Miyako via 4D_Tech
if you must use native commands only, then

http://doc.4d.com/4D-Language-Reference-17/Communications/SEND-RECORD.301-3729974.en.html
http://doc.4d.com/4D-Language-Reference-17/BLOB/DOCUMENT-TO-BLOB.301-3730325.en.html

2018/07/31 3:48、Chip Scheide via 4D_Tech 
<4d_tech@lists.4d.com>のメール:

I do not see a command that allows this action (directly)
am I missing something, or do I need to write something?



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Record to Blob?

2018-07-30 Thread Douglas von Roeder via 4D_Tech
I don't recall a Record to BLOB command in 4D. Both API Pack and
ObjectTools have that command, though.

--
Douglas von Roeder
949-336-2902


On Mon, Jul 30, 2018 at 11:49 AM Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I do not see a command that allows this action (directly)
> am I missing something, or do I need to write something?
>
> Thanks
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

v13 - Record to Blob?

2018-07-30 Thread Chip Scheide via 4D_Tech
I do not see a command that allows this action (directly)
am I missing something, or do I need to write something?

Thanks
Chip
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**