$segments.$add() crashes Studio
I’m not sure about the brackets in the path, but to find where the DF1 is, use a sys() to get the absolutely correct path, regardless of your spelling.
Sys 11,..,20 returns the pathname(s) of the current open data file segment(s) (empty if none are open).
Mike Matthews, Managing Director, Lineal Software Solutions Ltd
Apple Reseller, Microsoft Partner, SQLWorks Business Partner
phone: 01271 375999 | web: lineal.co.uk <www.lineal.co.uk/> | email: firstname.lastname@example.org <mailto:email@example.com>
> On 9 Aug 2017, at 09:32, Jean Marc Azerad <firstname.lastname@example.org> wrote:
> Hi guys,
> Sorry to bother with some antic kind of code, but I need to solve this issue fast.
> I have one customer still on DF1,who needs to add a segment on all his sites.
> The following code works on Mac but crashes Studio on PCs, (XP & 7)
> The manual addition of segment does work perfectly on Mac and PC, so it is not a matter of user’s rights
> Calculate Size as 524000
> Do $root.$datas.Edmus.$segments.$add(PathData,Size,ErrorCode) Returns DfPlus
> PathData contains C:DEVEDMUS (OS5)EDMUSdata
> Which where the DF1 is.
> Studio 5.2.3
> Any clue very welcome
> Thank you
> Manage your list subscriptions at lists.omnis-dev.com
Manage your list subscriptions at lists.omnis-dev.com