#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question David Crawford · Feb 15, 2018

I'm sending data via ajax to my REST service, and while retrieving any information sent in the url parameter is easy when they're defined in the route, I can't get anything if I store information in the data parameter. For example:

$.ajax({
               url: "ServerURL",
               data: { "some": "json" } //How do I get this information?

...

I've looked at many common solutions such as here:

https://community.intersystems.com/post/lets-write-angular-1x-app-cach%C3%A9-rest-backend-part-9

8
0 1359
Question Jenna Makin · Sep 23, 2016

I was curious if application partners were developing their own task managers for scheduling background tasks, or using the built in task schedule that is part of the Cache platform.

For those that are using the Cache task manager, what has been your method for distributing default tasks that your application needs during initial install as well as upgrades?  Are you distributing an export of the %SYS.Task object, or perhaps you are distributing an installation script that adds a task to the task scheduler when it is first run?

3
0 3167
Question Mike Minor · Feb 9, 2018

I'm trying to learn how To use SQL in CACHE, so I hope I don't bore you with "Dumb" questions.... 

I'm getting "ERROR #6022: Gateway failed" message following this line of code. 

s sc=gc.Prepare(hstmt,pQuery) 

This line of code comes from an example I found in the documentation.  pQuery is the "Select" statement setting up the variables and tables I'm trying to pull information from. 

What does that error indicate? 

Thank you. 

5
0 1420
Question John Murray · Feb 13, 2018

Documentation here lists the kinds of members a class definition may contain. In summary:

  • Parameters
  • Methods
  • Properties
  • Class queries
  • XData blocks
  • Projections
  • (and some that are relevant only for persistent classes):
    • Storage definitions
    • Indices
    • Foreign keys
    • SQL triggers

Later in the same document, a section headed "Class Member Names" contains this warning:

So I'm interested to hear how other DC members handle this.

7
0 418
Question Soufiane Amroun · Jan 15, 2018

Hi community ,

i work actually on the access token generation method , i want know where the generated access token are saved ?

My [OAuth2.AccessToken]  tabe is empty , it's logical?

thank's for helping .

Best regards

5
0 862
Question Arun Kumar · Feb 5, 2018

Hi Guys,

I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework. 

If any lead would be appreciated. 

Thank you in advance. 

13
0 1298
Question Nael Nasereldeen · Feb 11, 2018

Hi,

Is it possible to Save a base64 data string, representing a png, as a binary png file, In Cache?

When I search google , in general , not Cache specifically,  I see such articles:

https://stackoverflow.com/questions/11511511/how-to-save-a-png-image-se…

and this answer:

You need to extract the base64 image data from that string, decode it and then you can save it to disk, you don't need GD since it already is a png.

But I don't know how to implement that in Cache.

Regards,

Nael

2
0 5455
Question Anil S Sheno · Feb 9, 2018

Hi,

      Has anybody used /epic/prd/bin/runlevel with different options to bring up or shutdown the cache db. I cannot see any information about it in the manual.

Regards,

Anil

2
0 430
Question Rui Figueiredo · Jan 4, 2018

Hi, 

I would like to set the report headerHeight dynamically based on a group records count.

Example:

If GroupA has 5 records then the headerHeight should be 50mm

If GroupA has 3 records then the headerHeight should be 30mm

Could you please advice the best approach to achieve this?

Thank you,

Rui

1
0 277
Question Daniel Kutac · Feb 6, 2018

Is there an API that would list classes within a given package? I can't find any. I do have a workaround that uses class index, but this query lists all classes available in the namespace and I have to filter those I want. But this is just unnecessary overhead.

If anyone has spotted such API, please let me know.

TIA!

Dan

3
1 1307
Article Titto George · Feb 5, 2018 2m read

Zen report can create PDF document (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GRPT_xslfo_pdf_config ). Store your images in the table. Pass session id to the Zen report. Zen report will select images using SQL. The <img> element will insert images to the report:

<img width="100%" src="!@ImageName" contentHeight="scale-to-fit" contentWidth="#(..ImageWidth)#" style="position:absolute" content-type="image/jpg"/> 

Do the following (See the attachment image_to_pdf_using_zen_reports.doc for details):

0
0 766
Question Eduard Lebedyuk · Feb 5, 2018

Currently to check if the class  is mapped I call:

ClassMethod IsClassMapped(class) As %Boolean

{
  set sc = $system.OBJ.GetClassList(.classes,"/system=0 /percent=0 /mapped=0")
  quit $data(classes(class))
}

And it works, but I'm interested if there is a simpler approach out there?

2
0 417
Question Minsu Kim · Feb 5, 2018
Hi global developers!

I am using terminal but I have some problem with it.

I use $C(1) (ascii code 1) to separate data but I can't see it in the terminal and This is really hard to see in the table.

So I want to get you guys good brain and skill :)

how can I see it in the terminal ?

Terminal(intersystems) :

I can't see anything

another program :

It replaced ascii code 1 (=SOH) to  ┌ (Special Character)

I want to see like another program in Intersystems's terminal.

Thank you smart developers!

3
0 476
Article David Loveluck · Feb 1, 2018 1m read

Here is a snippet that I learned yesterday

You can define an index on a collection property but when I tried to use it, I failed. I was using

     Select ….. where …. :xx %INLIST collproperty

But this will not use an index, but the equivalent syntax

     SELECT .. WHERE ... FOR SOME %ELEMENT(collproperty) (%VALUE=:xx)

will use the index 

Check out

     http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

Dave

2
1 386
Question Hemang Patel · Feb 1, 2018

Hi 

I am new to cache and accessing it using odbc (other data sources) from excel. I need to know how to get hold of the number of rows for each every object in my current schema. 

I can find table name using following query but I need number of rows to estimate size of each table.

SELECT *
FROM %Dictionary.ClassDefinition ClassDefinition
2
0 1459
Question Pravin Barton · Jan 31, 2018

This might be more of a math problem than a Caché question.
I have a SQL query that joins two tables. I want to assign a unique ID to each row of the product table.

  1. I could append the GUIDs of the rows in the two tables, but there are a number of clients that expect a maximum length of 50 on this unique ID. Two GUIDs appended make 72 characters.
  2. I could append the two GUIDs and then truncate the result, but now I'm worried about collision.

What's the chance of collision if I append the GUIDs and truncate the result to 50 characters? Is there a good way to solve this without updating the clients?

12
0 1851