Robert Cemper · Oct 17, 2017 go to post

up to now I would do it:

SELECT Name,Home_Street FROM Sample.Person ORDER BY +Home_Street

Where's the improvement ? I see no difference.

Robert Cemper · Oct 16, 2017 go to post

 ERROR 5540 - User "UnknownUser" is not privileged for the operation.
This tells me that you don't login with a managed user with enough privileges.

So you could have a dedicated user just for this purpose.
OR
give "Unknown User" enough rights
OR
make use of a Privileged Application to assign temporary required Resources (my guess "%Developer") 

more on this and pp.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.PortalHelpPa…

Robert Cemper · Oct 16, 2017 go to post

Alexey,

You are totally right.
Indirection just does a mimic of "address" while it's in fact the "name" of a  variable or global.
A kind of "symbolic  addressing". 
 

Robert Cemper · Oct 10, 2017 go to post

I used this rule of thumb:

selectivity > 8 %  candidate for bitmap index

selectivity < 2 % normal index
in between it's a mater of investigation and other side conditions beyond selectivity

Robert Cemper · Oct 9, 2017 go to post

Olga,

You made my day.

It's really easy to follow and helps much more then the "short cutted" version.

I wish I had 5 votes.

yes yes  yes yes yes

Robert Cemper · Oct 3, 2017 go to post

I'd recommend Java as you are platform independent then.

Atelier + Eclipse are just another goody for developers 

Robert Cemper · Sep 29, 2017 go to post

That's fine and nothing new.
You missed my point:

With the Class Query it's not self explaining if params got to Prepare() or to Execute()
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…

I just learned from  John Murray a few comments above

Prepare() is for dynamic SQL, but in your case it's a class query you want to run.
So change your rs.Prepare call to be an rs.Execute one.


that you don't need a prepare with a Class Query.
I wasn't aware of that until a few hours ago.
Then it's obvious that any param has to go to Execute().

Robert Cemper · Sep 29, 2017 go to post

SQL Error 417 = Security Error

You should check your access rights inside 
- Windows
- Caché

Robert Cemper · Sep 29, 2017 go to post

Hi Ken,

For some odd reason Execute() requires he same parameters as Prepare() again !


%SYS>set rs=##class(%ResultSet).%New("Config.MapGlobals:List")
%SYS>write rs.Prepare("ENSDEMO","*")
1
%SYS>write rs.Execute("ENSDEMO","*")
1
%SYS>write rs.Next()
1
%SYS>.....
 
      Just hacking around.
Robert Cemper · Sep 26, 2017 go to post

As you said all are unique

I try to summarize it simple:
IDkey is used in storing object s. Best to be translated : Global subscript of data store.
Could be defaulted to %Integer >0

Unique key defines an index with unique values of a property in parallel to IDkey. Checked during object save.

PrimaryKey comes from SQL world and could be interpreted  mostly as a synonym to IDkey
 

Robert Cemper · Sep 25, 2017 go to post

ENSDEMO>d $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
 
The command prefix is currently set to: <<nothing>>.
Enter q to quit, ? for help.
ENSDEMO>>select * from Ens_Config.Credentials
1.      select * from Ens_Config.Credentials
 
ID      BusinessPartner PasswordObject  Password        SystemName      Username
 
.... Rows(s) Affected

Robert Cemper · Sep 25, 2017 go to post

or more object style

write ##class(%Library.TimeStamp).XSDToLogical(obj.biometrics.%Get(0).timestamp)

Robert Cemper · Sep 22, 2017 go to post

Just add another IF condition and replace all  "Country" by " Relation"

If ($g(pInfo:filters("Relation"))'="") {
   Set tWHERE = tWHERE _ $S(tWHERE="":"",1:" AND ") _ "Relation %STARTSWITH '" _ pInfo:filters("Relation") _ "'"
}

Robert Cemper · Sep 22, 2017 go to post

assuming variable payload holds your content of "payload"

set profileId=$piece($piece(payload,"profile_id"":""",2),""",")

set timestamp=$piece($piece(payload,"timestamp"":""",2),""",")

Robert Cemper · Sep 20, 2017 go to post

try 

Do ##class(%SQL.Util.Procedures).CSVTOCLASS(2, .rowType, pFileName, pDelimiter,,1) 
;; no defaults if not required or the EXACT count:  9 params = 8 comma   
;; I counted 9 

and/or

Property Name As %String (MAXLEN="");

and/or

;; the last comma in rowType looks also suspect to me.

set  rowType=" . . . .    ,ActiveStatus Boolean" 

HTH

Robert Cemper · Sep 20, 2017 go to post

yeah,
that's for slow typing senior writer's without  autocomplete. laugh

BTW. wrapping of this editor is sometime more than disturbing.

Robert Cemper · Sep 20, 2017 go to post

like this:

set ts=20160105125915

 ;; convert to $H
set th=$zdth($e(ts,1,8)_" "_$e(ts,9,10)_":"_$e(ts,11,12)_":"_(ts#100),8)

 ;; convert to UTC
set tu=$ZDTH(th,-3)

 ;; show $ZTS format (on UTC+0200 Vienna,Austria)
write $ZTD(tu,3)

2016-01-05 13:59:15

You can of course do it in a single unreadable long cascaded function chain.

HTH

Robert Cemper · Sep 19, 2017 go to post

Sebastian,

I share your considerations.
My personal interpretation of the IRIS message: 
  - go for Java for any application code and make use of the large developer market
  - stay in COS ( or .int) for internal DB manipulation with in depth "System Engineers"

Robert Cemper · Sep 19, 2017 go to post

my full support to 3 !!!!   and to 5, 2, 4 in this priority.

The difference between   ANSWER and COMMENT  causes  more confusion than being helpful.
Especially in the actual sequence.
Comment to Answers eventually may make sense. 
More than once I found myself in a Comment where it should have been an Answer.  

My suggestion:

 -handle all editing just in a modal pop-up .
- allow deleting (or hiding) your entry if you don't feel it appropriate anymore.