go to post Sergei Shutov · May 24, 2017 You should definitely store your storage schema in VCS. When you first compile and install your solution into an environment, it doesn't really matter -- as you said, storage will be generated automatically during compilation. However, this will cause major issues when you'll have to upgrade your environment to a newer version of your class and keep the data.If you had a class definition in Version 1 of your system with properties Address, Zipcode your storage schema will look likenode=$LB($ClassName,Address,Zipcode)If in version 2 you add another property, BusinessPhone, and you kept your schema, new storage definition will look likenode=$LB($ClassName,Address,Zipcode,BusinessPhone)And all old data will still be valid, just its BusinessPhone property will be emptyHowever if you didn't save your schema, new storage will be alphabetically sorted as this:node=$LB($ClassName,Address,BusinessPhone,ZipCode)And all old data will have its ZipCode as BusinessPhone now!I encountered this problem a couple of times, when class definition was exported before it was compiled (and storage schema was not updated), and it was not easy to fix: you need to iterate across the whole global and rewrite it, trying to guess if it's an old data or a new one.Hope this helpsSergei
go to post Sergei Shutov · May 11, 2017 Hi Angelo,Yes the easiest way is to use ODBC driver and it will behave same way as MySQL. See documentation below.http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...=Sergei
go to post Sergei Shutov · May 10, 2017 Try to add Recurse="true" to your import statement: <Import File="${SourceFile}" Recurse="true"/>
go to post Sergei Shutov · Mar 28, 2017 Still looks like a bug -- probably worth reporting somewhere... On the other hand it will probably break current solution once fixed.
go to post Sergei Shutov · Mar 28, 2017 What does it output when you run it with IgnoreErrors=1 in the Ignoring Errors: log lines? Sometimes it reports multiple errors there (like 5000,5202) -- so by looking at code you'll need to add those in your list: "5000,5202,5000,5373"
go to post Sergei Shutov · Nov 27, 2016 Look at $zboolean function:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...USER>w $zboolean(10,3,7)11
go to post Sergei Shutov · Nov 9, 2016 You can read about <STORE> errors and memory configuration in documentation: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
go to post Sergei Shutov · Nov 1, 2016 Cache Studio will only work with Cache database. It will not work with GTM. If you want to develop in Studio, you need to install Vista to your Cache instance.
go to post Sergei Shutov · Nov 1, 2016 Good to know, but somebody could definitely pick a better error code for this error...
go to post Sergei Shutov · Oct 28, 2016 Sure... You can either do it programmatically via Secutiry.Roles.Export() method in %SYS namespace:http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...or via ^SECURITY routine in %SYS namespace:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
go to post Sergei Shutov · Oct 6, 2016 I know it's not too difficult, just thought maybe there is an API call we can use which will do the job for us. There are few concerns, like conversions you mentioned, duplicate properties, query order nodes, etc. For example for string http://www.intersys.com/main.csp?a=b&QUERY=abc&QUERY=xyz data array would be data("QUERY",1)="abc" data("QUERY",1,"O")=2 data("QUERY",2)="xyz" data("QUERY",2,"O")=3 data("a",1)="b" data("a",1,"O")=1
go to post Sergei Shutov · Oct 4, 2016 Is there an easy way to parse query parameters into %request.Data-compatible format?
go to post Sergei Shutov · Oct 3, 2016 Evgeny, your link still points to localhost for some reason...
go to post Sergei Shutov · Sep 21, 2016 did you try to move CSP modules into Apache directory as recommended in documentation?http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
go to post Sergei Shutov · Sep 20, 2016 Go to management portal and purge cached queries.http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...It's better to address urgent issues (like system availability ones) to WRC.
go to post Sergei Shutov · Sep 5, 2016 All subscripts will be calculated before merge command will start global merge, so looks like you hit this command several (at least 2) times within a second. Since you don't have $JOB as a subscript or data node it also could be that it's done from different processes.On the other hand, it's considered a good code practice to assign $h to a variable somewhere at the top of the method, and use that variable instead of $h throughout the code.Consider this code for example:if (DAYNUM-$H>0) && (WKS>2) do ....if (DAYNUM-$H<=0) && (WKS>2) do ....You want to check if date is in future and do something different if it is. You would expect that only one branch of code would ever run; however in extremely rare circumstances when this code runs around midnight $h could change between first and second if statements and run both code branches, screwing up your database unpredictably.Another good practice is to pass "current date" as method argument instead of assigning $h inside a method. This way it's much easier to test methods.
go to post Sergei Shutov · Jul 18, 2016 Hi Mike,There are two ways to execute them, with %SQL.Statement (recommended):http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...And with %ResultSet (older one):http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
go to post Sergei Shutov · Jul 12, 2016 Here are ones we used at Dimas ltdcode_standards.doc code_standards_cheat_sheet.doc
go to post Sergei Shutov · May 26, 2016 Hi Kenneth, There is $toJSON method which you can use to convert any persistent object into JSON. Actually any %Registered object has it too!SAMPLES>set Person=##class(Sample.Person).%OpenId(1)SAMPLES>set personJson=Person.$toJSON()SAMPLES>write personJson{"$CLASSNAME":"Sample.Person","$REFERENCE":"1","Age":65,"DOB":39985,"FavoriteColors":["Yellow"],"Home":{"City":"Fargo","State":"NC","Street":"7424 Main Avenue","Zip":82189},"Name":"Novello,Olga I.","Office":{"City":"Pueblo","State":"MT","Street":"430 Franklin Place","Zip":29528},"SSN":"315-46-7788"}SAMPLES>w $zvCache for UNIX (Apple Mac OS X for x86-64) 2016.2 (Build 657U) Sun May 15 2016 20:35:24 EDT