go to post Robert Cemper · Nov 13, 2017 Positive! Confirmed!If you highjack your previous workspace (as I did by accident) there's nothing to move anymore.Especially all conections are there already.
go to post Robert Cemper · Nov 13, 2017 Suggested solution:#1 create a ROLE with resources DOCBOOK (Readonly) + the required Nmaspaces#2 remove required resources %Development from web application /csp/documatic #3 next create a user with the new defined role (here: "docread")I decided not to give %Development as it could allow access to terminal prompt.
go to post Robert Cemper · Nov 13, 2017 Thanks, I missed that leaving before And I've seen the new generated code added to %Save()It confirmed my feelings about %* ....
go to post Robert Cemper · Nov 13, 2017 Thank You Alex!I knew it's a can of worms and spread over documentation like feeding pigeons.And honestly I was pretty sure not catch them all and hesitated quite some time to touch it.. Great contribution.
go to post Robert Cemper · Nov 13, 2017 %On... callbacks are served and integrated into he OBJECT world and typically don't care about any Trigger.Triggers live in the SQL TABLE world of your class, with a hand full off %-variables unknown at the Object sideand without an actual instance of object but directly writing to Globals.Take a look to the generated .INT code of your class and see what you have at hands.I always found it quite ambitious to attempt a common code of both sides when directly changing Objects or Tables.Summary:- for SQL access have Triggers- for Object access have your %On* methodsApplies only before 2014.1 as pointed out. But Trigger code doesn't look much better.
go to post Robert Cemper · Nov 10, 2017 something similar: start ; open infile:"R":0 else write "input file not found",! quit open outfile:"WNS":0 else write "error creating output file",! quit set $Zt="end" for line=1:1:5 { use infile read sql use 0 if $e(sql,1,6)'="SELECT" continue set rs=##class(%ResultSet).%New() set sc=rs.Prepare(sql) set:sc sc=rs.Execute() if 'sc write "bad SQL statement",! quit set cols=rs.GetColumnCount() use outfile;; fill in headers if required while rs.Next() { for cols=1:1:cols write rs.GetData(cols),$c(9) write ! } write !,"###",! use 0 } end set $ZT="" close infile,outfile quit !! NOT TESTED !!
go to post Robert Cemper · Nov 10, 2017 %Save() stream doesn't mean closing.and Rewind() is different from %Reload().So the intention of the 3 out-commented lines is not obvious.Opposite to your comment %Open() does a reload from disk.
go to post Robert Cemper · Nov 8, 2017 It's available if you update an already existing object.NOT available for a New or Cloned object
go to post Robert Cemper · Nov 8, 2017 Do I understand it correctly?? Duplicates are allowed but detected.? Uniqueness is not forced
go to post Robert Cemper · Nov 7, 2017 an example how to use:https://community.intersystems.com/post/unlimited-unique-index
go to post Robert Cemper · Nov 7, 2017 Just for info:I'm elaborating a suggestion for an 'unlimitted' UNIQUE index based on old code fragments.It may take some time depending on my luck on personal backups.Here it is:https://community.intersystems.com/post/unlimited-unique-index
go to post Robert Cemper · Nov 7, 2017 correct.OVER(PARTITION BYis an unknown keyword in documentation You may need to reformulate your query to achieve a similar result
go to post Robert Cemper · Nov 6, 2017 Joel you are right!$ was the typical command prompt in VMS (at DEC times)
go to post Robert Cemper · Nov 6, 2017 Sorry, I don't have any Doc reference at hands.Eventually someone of the Atelier team has.Out of practical observationthere is a quite fundamental shift in the editing paradigm between Studio and Atelier.Studio does Server based editing. What you change is there and during your changing sessionyou lock the Class, Routine, ... So you act as single owner at that time andanyone else trying to change something gets an immediate alert. It's the "Highlander Principle" (according to the film) "There can be only One" http://wiki.c2.com/?HighlanderPrincipleIt's based on classical LOCK logic. "Pessimistic Locking"Atelier acts on your local copy and no one else might know unless you use some source control. !!At compile time your copy is checked and if it was changed you get a nice Text-Diff to decide how to to proceed.So we see "Optimistic Locking" or "Versioning".You can easily reproduce this: - open some Class or Routine in Studio and do any change (e.g. Comment) but no compile or save - open the same with Atelier. - no alert - change it in Atelier. - no alert - save it in Atelier. NOW you get your alert from server but you keep your local copy. - save your copy in Studio. - you are the winnernext: - do some dummy change in Atelier (I found no other way) - save it in Atelier and you get the Text-Diff with your version and the actual server version but as in past you get no hint how many changes you may have missed.personal remark:I think at that point latest anyone should have understood the importance of source control.to know of an intended change in advance and his history later.
go to post Robert Cemper · Nov 6, 2017 I like this idea:Settting a property "HasDuplicates" during indexing
go to post Robert Cemper · Nov 6, 2017 having this done ~ 9 yrs back I can't resist to share my old solution (at that time for a UNIQUE on 2000 char)- split Text into 4 sections in calculated properties e.g.tx1 = $e(Text,1,500)tx2 = $e(Text,501,1000) tx3 = $e(Text,1001,1500)tx4 = $e(Text,1501,2000)- index them- then you can build an SQL statement to have all 4 pieces identic.you end up with a cascade of embedded SELECTSIt's not to fast but very precise.
go to post Robert Cemper · Nov 5, 2017 Found it:Exceptions to READ COMMITTED 1 of some moreIf you query contains an aggregate function, the aggregate result returns the current state of the data,regardless of the specified ISOLATION LEVEL. Therefore, inserts and updates are in progress (and may subsequently be rolled back) are included in aggregate results. Deletes that are in progress (and may subsequently be rolled back) are not included in aggregate results. This is because an aggregate operation requires access to data from many rows of a table.see:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...