Force the update of local resources on next connection

J?rg Knebel (11/13/08 10:46AM)
Douglas Davis (11/13/08 11:57AM)


J?rg Knebel (11/13/08 10:46 AM)

<0B47F14D-7B92-48EC-8731-21B222F51D5C@...

Sheldon,

On 13/11/2008, at 03:15 :57GMT+11:00, Sheldon King wrote:

Can anyone tell me if there is a way to have all clients automatically

"Force the update of local resources" the next time they connect to  

the

server? This would be on 4Dv11.

I haven't tested it in v11 but it might help you to get started:

**************************

vsMethodName:=Current method name

  `SO_HandleResourceTransfer( Identifier)

  `dealing with resources transfered from 4D Server

  ` Created: 30/09/05, 15:03:32

  ` &copy; 2000 - 2005 TTT Data Systems Pty Ltd, Jörg Knebel

  ` Modified :30/09/2005, 15:03:32

ARRAY TEXT($docs;0)

C_TEXT($folder)

C_LONGINT($i)

  `QUERY([xSelectionGroup];[xSelectionGroup]

GroupName="ResourceTransfer")

  `RELATE MANY([xSelectionGroup]ID)

  `QUERY SELECTION([xSelectionItem];[xSelectionItem]ItemName=Get
MAC  

address )

  `If (Records in selection([xSelectionItem])=1)

$folder:=Get 4D folder+Structure file+GO_SysPathDelimeter

$oldRes:=$folder+"OLD"

Case of

: ($1=1)  `startup

If (Test path name($oldRes)=Is a directory )

$oldRes:=$oldRes+GO_SysPathDelimeter

DOCUMENT LIST($oldRes;$docs)

For ($i;1;Size of array($docs))

DELETE DOCUMENT($oldRes+$docs{$i})

End for

End if

: ($1=2)  `log out / Client shutdown

$err:=Test path name($oldRes)

If ($err=Is a document )

DELETE DOCUMENT($oldRes)

CREATE FOLDER($oldRes)

End if

If ($err<<0)

CREATE FOLDER($oldRes)

End if

$oldRes:=$oldRes+GO_SysPathDelimeter

DOCUMENT LIST($folder;$docs)

` double check on Windows !!!!

For ($i;1;Size of array($docs))

SET DOCUMENT
PROPERTIES($folder+$docs{$i};False;False;Current  

date;Current time;Current date;Current time)

MOVE
DOCUMENT($folder+$docs{$i};$oldRes+String($i))

End for

End case

  `End if

*************************

Cheers

Jörg

Douglas Davis (11/13/08 11:57 AM)

We use an apple script to activate the 4D Client and it starts by
blowing

away the local cache then calling 4D Client.  This guarantees the
resources

are refreshed each time.

--

|  Douglas S. Davis - Information Systems Coordinator

|  Monical Pizza Corporation  (http://www.monicals.com)

| - - - - - - - - - -

|  815/937-1890 - Voice  .  .  .  815/937-9828 - Fax

Reply to this message

Summary created 11/13/08 at 2:26PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com