Chris Stewart · Aug 3, 2017 go to post

Jeffrey, there's usually free parking on Cambridge Parkway, which is a short walk from the ISC Office

Chris Stewart · Aug 7, 2017 go to post

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?

Chris Stewart · Aug 8, 2017 go to post

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

Chris Stewart · Aug 21, 2017 go to post

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

Chris Stewart · Sep 6, 2017 go to post

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#…

Chris Stewart · Oct 27, 2017 go to post

HI Soufiane

I'd need more info about the format of the data and how you are sending it to comment any further

Chris Stewart · Oct 27, 2017 go to post

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)

Chris Stewart · Jan 19, 2018 go to post

Hi Wendy,

I would need to see some details of what your class is doing to comment further.  

Chris Stewart · Feb 15, 2018 go to post

Try reading the Request data with this

Set updateJSON = %request.Content.Read()

Edited because I missed that you already tried this?

Chris Stewart · Feb 15, 2018 go to post

Could you try making the call with a REST client like RESTLet for Chrome, and seeing if the request comes through on that method?

Chris Stewart · Mar 2, 2018 go to post

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

Chris Stewart · Apr 23, 2018 go to post

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

Chris Stewart · Jun 12, 2017 go to post

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

Chris Stewart · Aug 3, 2017 go to post

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

Chris Stewart · Sep 5, 2017 go to post

Hi Paul

You will need to execute it after Preparing it

  SET rset = tStatement.%Execute()
Chris Stewart · Nov 20, 2017 go to post

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

Chris Stewart · Jan 15, 2018 go to post

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

Chris Stewart · Jan 19, 2018 go to post

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