Re: Replacing Obsolete Subtable Commands in v15 to v17 Migration

2019-06-11 Thread Olivier Deschanels via 4D_Tech
Hello,

Another option is to think object. ie replace a sub table by an object field 
... including a collection (that’s not the only design).

Regards

Olivier

Envoyé de mon iPhone




> Le 11 juin 2019 à 13:23, Narinder Chandi via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
>
> Hi. So, after tackling the replacement of the majority of the obsoleted 
> commands in v15, the remaining ones are in the Subtable commands group 
> (ughhh!). The database I am upgrading has 11 Subtables. I have spent some 
> time perusing the archives prior to writing this - a lot of the posts are 
> quite historical, and there are various options discussed in different 
> threads. Having digesting everything, these are the 2 options I am 
> considering:
>
> 1. Do nothing - Subtables converted to regular tables in v11 and currently 
> working in v15 will continue to work as is in v17 using the obsoleted 
> commands. I view this option as just brushing the problem under the carpet 
> for another day and in the short term serves only to save the client the 
> expense of my consulting time.
>
> 2. Migrate all data access between Many to One tables to use Record commands 
> in place of the existing Subrecord commands. I envisage this process would be 
> something like:
>  a. Create a new Primary Key (PK) field in the One table (if needed) and add 
> that as a Foreign Key (FK) field in the related Many table (see note * below).
>  b. Iterate over the One table records identifying the existing related Many 
> table records in the previously converted v11 Subtable and update the FK 
> field in each of the related records as required.
>  c. Convert all of the existing obsoleted Subrecords commands to their Record 
> command equivalents.
>  d. Break the relation between the "id_added_by_converter" field in the Many 
> table and the One table.
>  e. As the "id_added_by_converter" field in the Many table and the Subtable 
> field in the One table are no longer required they can be now be removed?
>  f. Test, test and test again!
>
> Note that there may be other options to 2. above, but ideally I am only 
> looking to leave things as is for now or to completely solve this issue once 
> and for all.
>
> My question is - does option 2 stack up as an optimal and complete solution? 
> I think there is a less onerous solution that achieves the same end goal 
> based around using the "Get subrecord key" command but I'm not convinced that 
> I should consider that option.
>
> And finally, since I should give the client all acceptable "solutions", is 
> option 1 a viable option too?
>
> * since the v15 upgrade (I think) 4D Server has been complaining about 
> missing primary key fields in regards to the Log File so I need to address 
> the issue of missing keys in several tables in any case (I have seen some 
> prior discussion in the archives about this). Personally I would never create 
> a table without a (auto-incrementing) PK but it's a legacy database that 
> pre-dates my involvement...
>
> Regards,
>
> Narinder Chandi,
> ToolBox Systems Ltd.
> --
>
>
> **
> 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: Object notation bug?

2019-02-21 Thread Olivier Deschanels via 4D_Tech
Hi,

That’s not a bug. That’s normal.

$oChildObject:=New object create a reference to a object store in $oChildObject

 OB SET($oParentObject;"ChildInformation";New object) push another reference 
into the $oParentObject but the old reference still exist because $oChildObject 
isn’t cleared.

you try :  $oParentObject.ChildInformation:=Null
try this  $oChildObject:=null

and read $oParentObject

Regards,

Olivier





> Le 21 févr. 2019 à 18:59, Drew Waddell via 4D_Tech <4d_tech@lists.4D.com> a 
> écrit :
>
> I am trying to figure out if this is a bug or not.  This is a watered down 
> version of something I am trying to do:
>
>C_OBJECT($oParentObject;$oChildObject)
>
>$oChildObject:=New object
>$oParentObject:=New object
>$oParentObject.ChildInformation:=$oChildObject
>$oParentObject.ChildInformation.FirstName:="John"
>$oParentObject.ChildInformation.LastName:="Smith"
>
> I want $oChildObject and $oParentObject.ChildInformation to remain the same 
> and should because of how the references work, so at this moment each are 
> {FirstName:John,LastName:Smith}.  Let say something happens like maybe there 
> is a Clear button, how would one clear the child object?
>
> First, I wanted to do this:
>
>$oParentObject.ChildInformation:=Null // $oChildObject = 
> {FirstName:John,LastName:Smith}
>
> Okay, I thought that was the correct way to clear both objects but maybe 
> there is a different way so maybe this?
>
>OB SET($oParentObject;"ChildInformation";New object) // 
> $oChildObject = {FirstName:John,LastName:Smith}
>
> Nope, again the child object with $oParentObject is cleared but $oChildObject 
> remains {FirstName:John,LastName:Smith}.  So do I really have to loop over 
> all properties and remove them individually?
>
>OB REMOVE($oParentObject.ChildInformation;"FirstName")
>OB REMOVE($oParentObject.ChildInformation;"LastName")  // 
> $oChildObject = {}
>
> Finally when I make a change in the $oParentObject.ChildInformation the 
> referenced object $oChildObject is also updated.
>
> Is this a bug?  Shouldn't the :=Null work and also change the $oChildObject 
> variable?
>
> Thanks,
> Drew
>
> **
> 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: Collections

2018-03-16 Thread Olivier Deschanels via 4D_Tech
Hello,

Objects and Collections are really different.

A collection is not an object.

During the post-class of the next 4D Summit, for my side in French, or for the 
JPR side in English, we have the same slide with this sentence in red, bold, 80 
points 
Regards,

Olivier




> Le 16 mars 2018 à 03:43, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
>
> Hi all.
> 4D seem to be really fired up about the new Collection object available in 
> upcoming versions.
> I’ve read the examples given in the blurb, but I have yet to read anything 
> that would give me an idea as to why I would want to use a Collection instead 
> of an Object.
> It seems as though Collections are objects that don’t need a name parameter 
> to identify the content; but if I have to name a Collection, what’s the 
> difference between that and an Object item?
>
> There must be a very good reason for them, and I am sure I’m missing the 
> point, but what is it?...
> Cheers, Keith
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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: Change field type programmatically?

2017-12-01 Thread Olivier Deschanels via 4D_Tech
Hello,

Just in case …

You can select several fields in the structure window and change their type 
through a right clic. Even if the fields are in different tables.

Regards,

Olivier




> Le 1 déc. 2017 à 14:19, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> a écrit 
> :
>
> Using v16:
> I have a large number of fields (hundreds) that I want to change from
> String to Text. Is there any way to do this programmatically? I thought I
> might be able to do it via SQL commands, but apparently 4D doesn't support
> the ALTER FIELD function.
> I'd prefer not to spend the rest of the day changing them al manually :)
>
> Pat
>
> --
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 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: macros documentation

2017-09-07 Thread Olivier Deschanels via 4D_Tech
Hello,

Here is the documentation :
http://doc.4d.com/4Dv16R3/4D/16-R3/Creating-and-using-macros.300-3230741.en.html

Regards,

Olivier




> Le 7 sept. 2017 à 17:40, Charles Miller via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
>
> Hi All I have looked on 4d and perhaps I am blind, but I am looking for
> documentation on Macros. Where might I find it
>
> Regards
> Chuck
>
> --
> -
> Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
> Informed Solutions, Inc.
> Brookline, MA 02446 USA Registered 4D Developer
>   Providers of 4D, Sybase & SQL Server connectivity
>  http://www.informed-solutions.com
> -
> This message and any attached documents contain information which may be
> confidential, subject to privilege or exempt from disclosure under
> applicable law.  These materials are intended only for the use of the
> intended recipient. If you are not the intended recipient of this
> transmission, you are hereby notified that any distribution, disclosure,
> printing, copying, storage, modification or the taking of any action in
> reliance upon this transmission is strictly prohibited.  Delivery of this
> message to any person other than the intended recipient shall not
> compromise or waive such confidentiality, privilege or exemption
> from disclosure as to this communication.
> **
> 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: 4D Backup failure alert

2017-09-02 Thread Olivier Deschanels via 4D_Tech
Hello,

At the end of the backup the database method ‘On backup Shutdown’ is fired.
This method receive a error code as first parameter.
You may have more detail thanks to GET BACKUP INFORMATION command.

—> 
http://doc.4d.com/4Dv16/4D/16.2/On-Backup-Shutdown-database-method.301-3434276.en.html

Regards,

Olivier


Le 2 sept. 2017 à 15:28, stardata.info via 4D_Tech 
<4d_tech@lists.4d.com> a écrit :

I all,

I'm looking for a way to get a notification when a backup error is
triggered. Is there a way that i can follow to make a custom code
that advertise me when this event comes up?

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