go to post Eduard Lebedyuk · Dec 13, 2018 If that doesn't work too, try SELECT 1 If it fails - connection/config problems. If it succeeds it's something else.
go to post Eduard Lebedyuk · Dec 13, 2018 Can you please provide the code to initialize sample oMetadata object?
go to post Eduard Lebedyuk · Dec 12, 2018 %ObjectToJSON writes stream to current device. You need to write to stream: set oMetadata = ... /// metadata is from ADT message which is dynamic object set stream = ##class(%Stream.GlobalCharacter).%New() set tSC = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(stream, oMetadata) quit:$$$ISERR(tSC) tSC set request = ##class(Ens.StreamContainer).%New(stream) set tSC = ..SendRequestAsync(..JSONOperation,stream,0,,..MetadataContext) /// send the stream to operation And your JSONOperation should be able to accept messages of Ens.StreamContainer class. I just checked Ens.BusinessService:SendRequestAsync signature and it's: Method SendRequestAsync(pTargetDispatchName As %String, pRequest As %Library.Persistent, pDescription As %String = "") As %StatusSo maybe the last line should be just: set tSC = ..SendRequestAsync(..JSONOperation, stream) Finally, use %ZEN.Auxiliary.altJSONProvider instad of %ZEN.Auxiliary.jsonProvider. It's faster.
go to post Eduard Lebedyuk · Dec 11, 2018 At the very least changes in:Query elements of any classClassMethods with [SqlProc] modifierMay require a query purge.
go to post Eduard Lebedyuk · Dec 11, 2018 It could be easier just to log what client serves to a server in a form and do the same in objectscript.
go to post Eduard Lebedyuk · Dec 10, 2018 Try this: set test = 2 set sc=req.Get("/api?city=baltimore&postall_code=212", test) it would display response error. Also please post: write $System.Status.GetErrorText(sc)
go to post Eduard Lebedyuk · Dec 10, 2018 Try this.1. Stop caché.2. In cache.cpf write correct remote license server [LicenseServers] LOCAL=host,port where port usually is 4001 3. Start instance Instance should start and show correct license information.
go to post Eduard Lebedyuk · Dec 10, 2018 The benefits are:You only need one license key for many serversServer can consume however much licenses it needs, up to a specified max limit.Use it for multiserver deployments.
go to post Eduard Lebedyuk · Dec 9, 2018 Submitted code is not public by default.Players get different inputs for puzzles.All timings are calculated from the moment the puzzle is published, not the moment you start working on it.Assuming fastest coder would publish the code, finding it and rewriting it is going to take time.Moreover fastest solutions usually use, let's say, advanced language-specific concepts, so starting from scratch could often go even faster.
go to post Eduard Lebedyuk · Dec 9, 2018 Are you talking about %SQL.Util.Procedures:CSVTOCLASS?I've used it many times and it works with masked delimiters just fine.Can you post an example?
go to post Eduard Lebedyuk · Dec 5, 2018 Thank you!That's exactly it.Removing empty <Setting> tag helped.
go to post Eduard Lebedyuk · Dec 4, 2018 I don't think we need to create a new datatype as Vitaliy Serdtsev mentioned about the class %VarString.Sure if you have this class, it's better to use it.
go to post Eduard Lebedyuk · Dec 3, 2018 %INLIST assumes a list structure and you're passing a string.There are two ways so solve it:1. Store list structure right from beginning. To do that define your property as: Property mylist as %List(MAXLEN="") [InitialExpression = {$lb("route1", "route2", "route3"}]; and in your method you don't need $listbuild as you already have a list structure in your property, so replace: set routeList = $LISTBUILD(mylist) with set routeList = yourObj.mylist 2. If you already have a lot of comma-delimited strings, you can convert them to list. In this case property stays the same, but replace: set routeList = $LISTBUILD(mylist) with set routeList = $ListFromString(mylist) I recommend first approach. Also read the docs about $list functions. It is one of the core Cache concepts.
go to post Eduard Lebedyuk · Dec 3, 2018 *** Do you see any drawback or issues with this? Can there be any other impact due to this?This is absolutely not a recommended approach.Here's how you can do it.Create your own class MyString that extends %String and specifies MAXLEN parameter (I recommend 5000 or 10000, but something specific in any case).Use %Dictionary package to iterate over all your persistent classes. In there:open each classiterate over its propertieschange %String type if found to MyStringsave classRecompile modified classes.
go to post Eduard Lebedyuk · Dec 2, 2018 It reads up to 1000000 characters, not stopping on line terminator.I want x variable to contain only one line from file.
go to post Eduard Lebedyuk · Nov 29, 2018 Check LIKE documentation:ESCAPE ClauseESCAPE permits the use of a wildcard character as a literal character within pattern. ESCAPE char, if provided and if it is a single character, indicates that any character directly following it in pattern is to be understood as a literal character, rather than a wildcard or formatting character. The following example shows the use of ESCAPE to return values that contain the string '_SYS': SELECT * FROM MyTable WHERE symbol_field LIKE '%\_SYS%' ESCAPE '\' So in your case: SELECT ID, CompanyName FROM Table1 WHERE CompanyName LIKE '%\%%' ESCAPE '\'
go to post Eduard Lebedyuk · Nov 26, 2018 Right you are!I usually store files external from database and write a simple persistent class Document { GUID, DisplayName, FileStream }. User requests files by GUID, and it's served to him with Displayname in header.Additionally files are never named on filesystem by Displayname, or any kind of user input but rather by hash or a simple incremental counter.Storing more than 1k (10k) files per directory is not recommended, if possible add more directories (by date, etc.)