go to post Vitaliy Serdtsev · Jul 3, 2017 Yes, see part "Creation of a custom error message dictionary" PS: you can even use the letters, for example: <?xml version="1.0" encoding="UTF-8"?> <MsgFile Language="en"> <MsgDomain Domain="asd"> <Message Id="a" Name="ErrorName1">Message about some error 1</Message> <Message Id="b" Name="ErrorName2">Message about some error 2 %1 %2</Message> </MsgDomain> </MsgFile>
go to post Vitaliy Serdtsev · Jun 29, 2017 #dim list As %ListOfDataTypes d ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject("[""a"",""b"",""c""]",,.list) w list.Count(),!
go to post Vitaliy Serdtsev · Jun 21, 2017 It is not clear what it will give. To Richard need to save the binary data encoded in hex. For example, instead of '0x2122232425262728292A2F' to the database should persist the value !"#$%&'()*/ USER>w $c(33,34,35,36,37,38,39,40,41,42,47) !"#$%&'()*/ USER>w ##class(%xsd.hexBinary).LogicalToXSD($c(33,34,35,36,37,38,39,40,41,42,47)) 2122232425262728292A2F USER>zzdump ##class(%xsd.hexBinary).XSDToLogical("2122232425262728292A2F") ; 0x omitted 0000: 21 22 23 24 25 26 27 28 29 2A 2F !"#$%&'()*/
go to post Vitaliy Serdtsev · Jun 20, 2017 The solution: USER>w ##class(ITPlanet.BlackBox).Main({"trantable":"JSON"},"I") Hello World! USER>w ##class(ITPlanet.BlackBox).Main({"trantable":"JS"},"I") Hello World!
go to post Vitaliy Serdtsev · Jun 16, 2017 URL and URI Conversions Try: Set tURL=..Adapter.URL_"/claims/"_##class(%CSP.Page).EscapeURL(pRequest.claimBlob) or Set tURL=..Adapter.URL_"/claims/"_$zcvt($zcvt(pRequest.claimBlob,"O","UTF8"),"O","URL") USER>w $zcvt($zcvt($c(0,1,2,1025),"O","UTF8"),"O","URL") %00%01%02%D0%81 USER>w ##class(%CSP.Page).EscapeURL($c(0,1,2,1025)) %00%01%02%D0%81
go to post Vitaliy Serdtsev · Jun 15, 2017 See $zcvt for JSON, e.g.: USER>w $zcvt($c(0,1,2),"O","JSON") \u0000\u0001\u0002 USER>zw $zcvt("\u0000\u0001\u0002","I","JSON") $c(0,1,2) USER>w {"binary":($c(0,1,2))}.%ToJSON() {"binary":"\u0000\u0001\u0002"}
go to post Vitaliy Serdtsev · Jun 15, 2017 But you can use Kerberos: About Kerberos and the Access Modes. Then maybe it would be better to move the functionality of the Web(Terminal) in the Atelier?
go to post Vitaliy Serdtsev · Jun 15, 2017 Need: add a bitmap extent index in the class and/or increase the timeout in the CSP Gateway/WebServer
go to post Vitaliy Serdtsev · Jun 15, 2017 This does not negate the need to improve the Caché Terminal.
go to post Vitaliy Serdtsev · Jun 15, 2017 Nikita is an employee of InterSystems? If so, then it seems to me that it would be easier and more effective if upgrade a standard Caché Terminal, turning to the achievements of Nikita.
go to post Vitaliy Serdtsev · Jun 15, 2017 Congratulations, John.To be a moderator is a big responsibility, so I wish you a lot of patience.
go to post Vitaliy Serdtsev · Jun 15, 2017 The jsonProvider code may also be invoked from a non-Zen context by calling one of the following APIs: %WriteJSONFromArray %WriteJSONFromObject %WriteJSONStreamFromArray %WriteJSONStreamFromObject %ConvertJSONToObject proof Example: d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.stream,..%OpenId(1),,,1,"aelqoc") w "<- json = ",stream.Read(),!
go to post Vitaliy Serdtsev · Jun 15, 2017 I do have a question, though: Is there any way to use a defined ODBC DSN in the connection string using CacheActiveX? No: Defining a Connection String
go to post Vitaliy Serdtsev · Jun 14, 2017 Example: ADODB + $list Defining and Using Stored Procedures
go to post Vitaliy Serdtsev · Jun 14, 2017 Do make re-indexing: How to build indices for a class if you add an index after creating records
go to post Vitaliy Serdtsev · Jun 14, 2017 E.g.: s fileName="C:\temp\test.txt" s f=##class(%FileCharacterStream).%New() s f.Filename=fileName s f1=##class(%FileCharacterStream).%New() s f1.Filename=fileName d f.Write("start ") d f.CopyFrom(f1) d f.Write(" end") d f.SaveStream() s f="",f1=""Result: test.txt (Before): bla-bla-bla test.txt (After): start bla-bla-bla end
go to post Vitaliy Serdtsev · Jun 14, 2017 If you know how to work with ActiveX from MS Excel VBA, then there is no problem. E.g. (demo.vbs): Set f = CreateObject("CacheActiveX.Factory") Set rs = CreateObject("CacheActiveX.ResultSet") If Not f.IsConnected() Then f.Connect("cn_iptcp:127.0.0.1[1972]:SAMPLES:_SYSTEM:SYS") Set rs=f.DynamicSQL("select TOP 3 * from Sample.Person") rs.Execute() while rs.Next WScript.Echo rs.Get("SSN") 'print of field SSN for first three rows from the table Sample.Person wend rs.Close() Set person = f.Static("Sample.Person") age=person.CurrentAge(45678) 'call of method of class Sample.Person WScript.Echo age End IfRunning a Query in Visual Basic
go to post Vitaliy Serdtsev · Jun 9, 2017 Indeed, thank you: Class demo.B Extends %Persistent [ Final ] { Parameter MANAGEDEXTENT As INTEGER [ Constraint = "0,1", Flags = ENUM ] = 0; Parameter READONLY = 1; Property P2; Storage Default { <Data name="BDefaultData"> <Value name="3"> <Value>P2</Value> </Value> </Data> <DataLocation>^demo.AD</DataLocation> <DefaultData>BDefaultData</DefaultData> <IdLocation>^demo.AD</IdLocation> <IndexLocation>^demo.AI</IndexLocation> <StreamLocation>^demo.AS</StreamLocation> <Type>%Library.CacheStorage</Type> } }
go to post Vitaliy Serdtsev · Jun 9, 2017 Is there any way to "generate" compatible storage? And why SQLStorage? Why not default CachéStorage, but copy-pasted from Class A? Unfortunately, to use %CacheStorage will not work, since at compile occurs the error: ERROR #5564: Storage reference: '^demo.AD' used in 'demo.B.cls' is already registered for use by 'demo.A.cls' > ERROR #5030: An error occurred while compiling class 'demo.B'