HI Sebastian
You may want to look at the Caché FileServer linked from the comments on this post
https://community.intersystems.com/post/url-security-over-2-applications
This may be a helpful starting point for you?
- Log in to post comments
HI Sebastian
You may want to look at the Caché FileServer linked from the comments on this post
https://community.intersystems.com/post/url-security-over-2-applications
This may be a helpful starting point for you?
Jeffrey, there's usually free parking on Cambridge Parkway, which is a short walk from the ISC Office
Hi Kishan
A method is attached to a specific instance of an Object class. A Classmethod can be called without having to instantiate the object.
So, we could have a Method on a Person object to update address
do person.UpdateAddress("New address")
Whereas, for a ClassMethod, we could define a Classmethod to give us as object instance to then work on
set person = ##class(User.Person).CreatePerson("FirstName","LastName",Age)
Hope that helps?
HI Minu
GBLOCKCOPY is used to create a smaller database, after some data is removed and leaves sparse space in the database. If your database is full, then copying it will not save space. Before anything else, you should check the size of your globals and remove any data that you do not need. GBLOCKCOPY should then reclaim some space for you
HI Rui
Unicode 0x3 is the ETX character, which can be used as newline in certain text editors. Any control chars are disallowed in XML processing, so these should be stripped from whatever query you are using to drive this report
HTH
Chris
If you're iterating that would typically be done with a CURSOR. Each fetch cycle would pop the new state of the variables in, in line with each row (make sure you check for SQLCODE while doing this, to determine if there is a row to fetch).
More documentation on this is at
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
EDIT:
Mixed my dynamic SQL methods there. You would use rset.%Next to do this iteration in %SQL.Statement, but the general theory still holds
http://localhost:57773/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_dynsql#…
HI Soufiane
I'd need more info about the format of the data and how you are sending it to comment any further
So I think you're encoding it as an Authorization Header?
In that case, you can extract this from
set Auth = %request.GetCgiEnv("HTTP_AUTHORIZATION")
then process this however you need to (for example if you have something like "Basic 123908109abc", this will unpack it and decode the Base64)
set AuthType = $P(Auth," ",1)
set AuthString = $P(Auth," ",2)
set DecodeAuthString = $SYSTEM.Encryption.Base64Decode(AuthString)
set userid = $p(DecodeAuthString,":",1)
set token = $p(DecodeAuthString,":",2)
Hi Wendy,
I would need to see some details of what your class is doing to comment further.
Try reading the Request data with this
Set updateJSON = %request.Content.Read()
Edited because I missed that you already tried this?
Could you try making the call with a REST client like RESTLet for Chrome, and seeing if the request comes through on that method?
Hi Jay
This has happened a few times, and I've readded them a few times. I'll see if I still have the images handy and get them reattached again
If I'm writing something that will maybe run 2 or 3 times, and is less than 10 lines of code, I might use a .mac. For anything more than that, I would use a class, as the time saved in setup is pretty negligible compared to the rest of the work done
HI Stephen
I beileve https://community.intersystems.com/post/rest-how-pass-query-parameters#… has an example of this
Thanks
Chris
Thanks Evgeny
It's specifically this post that seems to be worst affected https://community.intersystems.com/post/lets-write-angular-1x-app-cach%…
Just to add a word of warning. The syntax for %Object is only available in 2016.1, and is deprecated in favour of similar but incompatible objects and syntax in later versions. If you have the choice of versions, it would be wisest to adopt 2016.2+ and use the DynamicObject class and methods, as this will be more futureproofed
Details are at https://community.intersystems.com/post/json-changes-cach%C3%A9-20162
Hi Javier
I did this by implementing a fromJSON method on each class, which allows me to do what you describe. By moving this to the persistent class, I don't have to worry about instantiating or accessing the object, but can just apply a JSON update to an object
The details are in https://community.intersystems.com/post/lets-write-angular-1x-app-cach%C3%A9-rest-backend-part-9
Hope this helps
Chris
There can be more to "speed" that just execution time of your code. If you need to add an index to help performance, then a Caché SQL query will be able to utilise it without any code changes. If you are using $Order, then you need to spend some time writing and testing your new code.
I typically use SQL to identify objects, then Object methods to interact with them, but for simple updates of large numbers of objects, I'll usually use a simple SQL Update. The beauty of Caché is the flexibility to use the best tool for the task at hand
Hi Simcha
I've written a multi part guide to doing just this (it's not complete yet, but I've been struggling to get enough time to finish it). You can find it here - https://community.intersystems.com/post/lets-write-angular-1x-app-cach%C3%A9-rest-backend-start-here
Hope that helps
Chris
Hi Rubens
Fabian wrote a great article about RegExp matching in the Routes here:
https://community.intersystems.com/post/advanced-url-mapping-rest
However, I don't believe that you can do conditional expressions inside the Route. I think you would instead have to do this in your Method code (happy to be corrected by someone more clever than I am)
Hi Confused
If you're a Trak customer, your best option is to raise a TRC to have the appropriate Support team assist. However, IE11 isn't a fully supported platform for Layout Editor, though it will work. You will need the Microsoft DHTML Editing Component at a minimum, this can be obtained from
https://www.microsoft.com/en-gb/download/details.aspx?id=8956
Hope this helps
Chris
Hi Manoj
There's example code of reading a JSON string from a POST request, and then transforming it to an object in
https://community.intersystems.com/post/lets-write-angular-1x-app-cach%C3%A9-rest-backend-part-9
Hope that helps
Chris
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
$EXTRACT can also be used for substringing, and should prove useful
Hi Paul
You will need to execute it after Preparing it
SET rset = tStatement.%Execute()
Hi Sofiane
I'm assuming you want to read this from a JSON payload. You can follow the instructions in https://community.intersystems.com/post/lets-write-angular-1x-app-cach%… to implement a fromJSON method, after reading the payload from the HTTPRequest
HTH
Chris
Yes, but using a relationship to do this would automate a lot of cross referencing. For the example above, a 1-1 relationship would keep each side correct, when an update is made on either side
See http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY… for more details
Are there locks against this global? You can check this with View Locks in the Management Portal
Also, are you sure that the Backup was taken using an appropriate backup tool? Generally a backup will be taken from a consistent state, and would not include locking
Hi Sudarshan,
If you are using a version later than 2016.2, then the following guide shows how to read through a Request content and parse out a JSON object
https://community.intersystems.com/post/lets-write-angular-1x-app-cach%…
Reposting as an answer to get this removed from the "Unanswered questions" list
HI Rui
Unicode 0x3 is the ETX character, which can be used as newline in certain text editors. Any control chars are disallowed in XML processing, so these should be stripped from whatever query you are using to drive this report
HTH
Chris
HI Gary
There's an example of this in the SAMPLES database if you have that installed. Take a look for upload.csp in /csp/samples
HTH
CHris