Caché

Syndicate content 124 

Currently one of our applications, coded in Cache, performs web service API calls out to one of our vendors.   We now need to be able to send a Client ID in the portion of the Soap envelope.  

I  think I have a clue of what I need to do but not 100% sure.  We were thinking we could use the method %SOAP.WebClient.SetHttpHeader(field name, value) but when I have tired using this method and looked at the Soap log to see what is sent, the field is never showing.  I realized I could be setting the wrong object using the method.

Last answer 14 hours 15 min ago Last comment 11 hours 4 min ago
0   0 2
37

views

0

rating

ENSTEMP was addressed already some time ago; 
Article: Preventing Globals From Getting Journaled (Continued from How do I Minimize My Journals)

and is also in public documentation
Where InterSystems IRIS Stores Temporary Production Data

Though I'd like to understand if this is just naming a non-journaled DB
or are there also typical features of CACHETEMP / IRISTEMP related to it:

  • automatic clean-up at system startup 
  • keeping Global Buffers in memory as long as possible
  • late writing to the storage file 

In other words is it a 2nd, 3rd, .. fully feature blown IRISTEMP  ?  

+ 1   0 0
0

comments

45

views

+ 1

rating

Hi,

I am implementing free search text box, which can search data in all columns of tables.

I have created DisplayName column by concatinating two column data with space.

SELECT TOP ALL FirstName||' '||LastName AS DisplayName, UserType, IsActive, RoleName, DOB FROM LISDB.ExternalUsers

Now, in where condition I want to do like search in DisplayName column but it not working.

I have tried both fn CONCAT and  || in like query but both are not working for me. 

Last answer 5 days ago Last comment 5 days ago
0   0 3
75

views

0

rating

IRIS offers Durable %SYS Directory as a highly useful feature for working with containers.

Before inventing the wheel once more I'd like to know if a similar feature also exists for Caché / Ensemble.
Official documentation is quite silent about.
Though I have some names in mind that might know more about   ( @Luca Ravazzolo @Dmitry Maslennikov  ?     @Eduard Lebedyuk ?  )

Last answer 6 days ago Last comment 6 days ago
+ 3   0 2
104

views

+ 3

rating

Hi,

I have a large XML zen report file that I want to convert to a CSV, what is the most efficient way to do it.

XML file:

<Details>
<Col1> aa1 </Col1>
<Col2> bb1</Col2>
<Col3> cc1 </Col3>
</Details>
<Details>
<Col1> aa2 </Col1>
<Col2> bb2</Col2>
<Col3> cc3 </Col3>
</Details>

Expected Output:

Col1,Col2,col3
aa1,bb1,bb1
aa2,bb2,bb2

Thank you.

Last answer 8 days ago Last comment 7 days ago
0   1 3
121

views

0

rating

Hi

I've got a string variable which I need to convert into a XML one.

My main goal here is to use the XML bit I've extracted from a HTML file in a message I need to pass over to an operation.

I'm doing the following which always errors

classMethod WriteNodes(myfile As %String)
{
    Set status=##class(%XML.TextReader).ParseString(myfile,.reader)

....

Any easy way of making this happen?

Kind regards

Last answer 22 February 2019 Last comment 9 days ago
0   1 4
234

views

0

rating

Hi all, 

I am trying to create a method to count the number of entries in a global, including all subscripts. I am having a bit of trouble getting the code to make it to the second subscript. When I get to the position where my key is "Canada" and I add a comma and empty quotes to it, it returns USA as the new key when I do the order function. Is the $Order or the global not able to use a single string to represent multiple subscripts?

 

Here is my global structure:

Last answer 26 August 2019 Last comment 11 days ago
+ 2   0 8
211

views

+ 2

rating

Hi,

I want to do ordering dynamically in Query. I mean to say that order by value will not be hard coded in query, it will be passed in parameter.

I have tried to it following way, but it is not working for me. Can you please advise me how can I achieve it?

In below code, Order by :objSearch.SortingField is not working.

Last answer 11 days ago Last comment 11 days ago
0   0 1
52

views

0

rating

hi,

i have two where-clauses:

a)  ... WHERE company=1 and product=7

b)  ... WHERE product=7 and company=1 

with other words the position of the where fields are swapped.

now the question is:

bring the where clauses a) and b) the same performance(queryplan) or do i have to write it in a special order???

in my point of view, there is a  parser/optimizer who cares about this, so i don't have to care about. 

+ 2   0 4
0

comments

122

views

+ 2

rating

Hello,

I have a small SQL question.  

Running an example queries in our Samples Namespace: 

1. select top 5 Description,Category from Cinema.Film order by Category - runs fine no issues and returns 2 columns as expected

2. select top 5 * from Cinema.Film order by Category - runs fine no issues and returns 8 columns as expected

3. select top 5 Description,Category,* from Cinema.Film order by ID - runs fine no issues, and returns 10 columns, with my first 2 repeated

4. When I try to combine the first 2 queries: 

Last answer 12 days ago Last comment 12 days ago
0   0 3
43

views

0

rating

Hi all,

We just encountered an instance of a result set RS and while looping through the results,  RS is getting overwritten when method 1 calls out to method 2 (in the same class).  Method 2 creates it own result set also named RS.     

This code is several years old and never had this problem.    When I changed the name of the result set variable in method 1 the problem cleared up.  

I though that variables were automatically 'newed' in classmethods. ???

Last answer 12 days ago Last comment 12 days ago
0   0 1
51

views

0

rating

Hi folks,

My fist post here and a tricky question right away!

I have a remote MySQL database table ("SomeData"; not under my control), and a Caché-class (remote.SomeDataAccess) linked to it via ODBC using the link table wizard.

The remote table has a field "id" which is the primary key and an autoincrement bigint value. This has been considered in the setup and the generated class has an

Last answer 29 August 2019 Last comment 2 September 2019
+ 1   0 2
69

views

+ 1

rating

I have a repository that I want to have in my /home/centos7/ directory, but it appears that Cache cannot access files there. Is that really the case? 

It seems like this is the case because in System Management Portal, when I try to up a new database in /home/centos7/, there aren't any directories listed, even if I add a custom one. Is Cache blocked out from this directory, and are there any others that Cache doesn't have the permission to access? 

Last answer 30 August 2019 Last comment 30 August 2019
0   0 2
48

views

0

rating

I am still working on a generic task where I need to apply journal file records to another database. Initially I didn't want to use Journal.Restore class methods as I need to perform some data transformation, and it seemed that the clearest way to achieve it was to read journal file record by record using %SYS.Journal.Record API. 

Last answer 16 June 2018 Last comment 28 August 2019
+ 2   0 3
190

views

+ 2

rating

The .NET Core Identity model has an IPasswordHasher<> interface for  for 

  • Hashing a password so that it can be stored in a database
  • Verifying a provided plain-text password matches a previously stored hash. 

I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors.

Last answer 21 August 2019 Last comment 23 August 2019
0   1 2
100

views

0

rating

I'm a DBA and support Caché databases on AIX. I coded shell scripts for monitoring journaling status, databases size, license end date.

We recently got a new instance of Caché on Windows. I'm just curious to know whether anyone coded database monitoring scripts on Windows using PowerShell or any other scripting language.

If yes, please share the details.

 

Thanks & Regards,

Bharath Nunepalli.

Last answer 21 August 2019 Last comment 21 August 2019
0   0 3
116

views

0

rating

I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.

Last answer 13 August 2019 Last comment 13 August 2019
+ 1   0 3
90

views

+ 1

rating

Hello,

I am struggling to print out the actual property values of the Security.System class.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

 

I was hoping to be able to print the Authentication Enabled properties of a system from the command line using the Get or GetProperties class method. Currently, however, I am only able to get a return 1 or Invalid Oref error.

 

Last answer 29 July 2019 Last comment 8 August 2019
0   0 2
110

views

0

rating