Caché

Syndicate content 118 

Hi all,

I trying build a project with .NET and Entity Framework in the Code First method, but Caché return the error " 'VARBINARY' is not a supported type for CAST" when run this sql code:

INSERT "dbo"."__MigrationHistory" 
       ( 
              "MigrationId", 
              "ContextKey", 
              "Model", 
              "ProductVersion" 
       ) 
       VALUES 
       ( 
              '201706131048154_InitialCreate', 
              'CACHE2.SchoolContext', 
              cast( 0x1F8B0800000000000400CD59CD6EE33610BE17E83B083A1 ... d89cc74ff4e1285e7df81769242ce52e1f0000 AS varbinary(1549)),
              '6.1.3-40302' 
       )

 

I did all process of this link: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GBMP_eframe#GBMP_eframe_codefirst.

Last comment 22 June 2017
0   0 3
0

answers

309

views

0

rating

Recently I was conducting a remote support session with a site. The desktop they were sharing with me was on a PC configured with German as the native language. Since my German is rather rusty, and virtually non-existent when it comes to computing terms, I was glad to be able to switch the Portal session into English.

This is done from the page that appears when you use the About link:

All I needed to remember was that the About link is the second one, and the language selection dropdown is at the foot of that page.

+ 2   0 1
0

comments

157

views

+ 2

rating

It is possible to update Cache object property from Python using the following Python code, with import of intersys.pythonbind3:

my_object.set("my_property",["A","B","C"])

However, I am unable to save 2D %List with 2D Python array like the following:

my_object.set("my_property",[["A","B","C"],["1","2","3"]])

I am not sure whether this is Python-Cache bind flaw or design issue. Is there any alternative/ workaround to do the same for above?

Last answer 21 June 2017 Last comment 11 April 2017
0   0 2
167

views

0

rating

In toolbar, by default, all items show on one line and when menu items do not fit on visible part of screen, invisible items hide and appear two buttons - last item and previous item.

I want, in that case, items, which do not fit on visible part of screen, go on second line. In other words, I want all items to be visible.

Is it possible to configure toolbar for behavior I want?

 

Last answer 21 June 2017
0   0 1
0

comments

125

views

0

rating

Hi, Community!

How do you store the source files of your Caché project? What is the directories structure? What are the benefits?

I prefer the following structure:

/cls/package/subpackage/class.cls

/mac/package/routine.mac

/int/package/routine.int

/inc/macro.inc

/dfi/folder/sample.pivot.dfi

Example

Benefits: 

  • folders are packages.
  • easy to understand what type of sources are in the project.

What is your approach?

Last answer 21 June 2017 Last comment 20 June 2017
+ 2   0 3
498

views

+ 2

rating

Hi, Community!

And so I continue with publishing of the tasks for the Final round of InterSystems Contest on InterSystems Caché and DeepSee as a part of IT Planet Student Championship in Sochi. This year we had about 2 000 participants in InterSystems Contest.

One of the tasks for the finals was to crack the black box!

Last answer 20 June 2017 Last comment 20 June 2017
+ 2   0 5
368

views

+ 2

rating

Hi all,

I have a non objectscript application connecting to a cache instance via ODBC and one column is a list of serial objects. The output from the query contains a lot of special characters and I'm hoping there's a better way to get this data back so I won't have to perform extensive parsing on the application side.

I've tried using the $ListToString() function, but that didn't help much, probably because the list contains complex objects rather than primitives. 

Any help will be greatly appreciated!

Last answer 19 June 2017 Last comment 18 June 2017
+ 1   0 3
351

views

+ 1

rating

In Cache Studio there is export class dialog with options "Export current project" and "Include dependent classes".

Is there any way to export class programmatically, but with same effect as if "Include dependent classes" was checked? So that not only the class itself is exported, but also all dependent classes? I know of Export method in %SYSTEM.Obj class, but it only exports the class itself.

Last answer 13 April 2017 Last comment 18 June 2017
0   0 5
319

views

0

rating

Hello,

I have a question related to running an SQL query for range of data.

I am running a query like:

Select A,B from table_name where A>=12345 AND A<=12390

 - Where A and B are my two of the properties under the mentioned table/class definition

- A is an integer property

 Question: The result of the above query does not return me all the values between the mentioned range of integer though I do have all the values in that range. I see that some of the values are missing in result.

Any reason why this query won't work?

Any ideas?

 

Thanks,
Aditi

Last answer 18 June 2017 Last comment 16 June 2017
0   0 8
258

views

0

rating

In addition to its general security, Caché offers SQL security with a granularity of a single row. This is called row-level security. With row-level security, each row holds a list of authorized viewers, which can be either users or roles. By default access is determined at object modification Some time ago I became interested in determining row-level security at runtime. Here's how to implement it.

Last comment 16 June 2017
+ 1   0 5
292

views

+ 1

rating

I am trying to design a RESTful service that takes a string (with control characters). Does something with that in the logic on the server, then returns a string, which may also have control characters.

 

Basically the string is a pharmacy claim in a delimited format that uses control characters for those delimiters. The logic on the server will pull the entire claim apart and process it.

 

I was thinking that a GET method could be uses but I'm used to sending content in JSON format and wondered what other normal RESTful ways there were to do this.

Last answer 15 June 2017 Last comment 16 June 2017
0   0 2
334

views

0

rating

Whenever I try to run a simple query on a production database table, I get a timeout 504 error. I'm using the SQL interface in Ensemble. One of the queries is a simple SELECT TOP 10. Even SELECT COUNT(*) gives a timeout. 

I have tried to run the SQL Runtime Statistics, but this gives me a timeout as well. 

Does anyone have an idea where I might look to find what is causing this? 

 

Thanks in advance, 

Best regards

Glenn van Bavel, 

 

 

Last answer 15 June 2017
0   0 5
0

comments

515

views

0

rating

Hi,

I only use Caché and CSP, I am making a simple request in CSP page with #call method, and I have to define a callback of this #call method, can I do this?

This is my simple request in CSP page (javascript):

            PainelBordoResource.prototype.obterIndicador = function(requisicaoParametros) {
                let retorno = #call(painelbordo.PainelBordoResource.obterIndicador(angular.toJson(requisicaoParametros)))#;
                return retorno;
            };
 

Last answer 14 June 2017
0   0 2
0

comments

186

views

0

rating

This is a translation of the following article. Thanks [@Evgeny Shvarov] for the help in translation.

Someone posted a question on DC asking whether it was possible to determine access rights for a particular table row always at runtime, and if it was, how could one do that?
Answer: it is possible and it’s not hard at all.

Last comment 14 June 2017
+ 3   0 3
263

views

+ 3

rating

Here's my issue. I've been using Sample.* globals and packages mapped to another development namespace to realize unit tests. So when I ran it, I notice that I forgot to start a transaction in order to be able rollback it to it's original data.

I assumed that I should use transactions since I was manipulating it's data but I didn't want it to be persisted.

Now I've lost all their default data. That's ok, or so I though... since I supposedly should run %Populate on the Sample.Company to have all data back (their integrity regarding the lost ones isn't relevant). However I notice that even though I could populate data back to Sample.Company, Sample.Employee wasn't being populated

Last answer 13 June 2017
0   0 2
0

comments

168

views

0

rating

Unless I'm mistaken, 2017.1 doesn't appear to support RFC 7523 (JSON Web Token Profile for OAuth 2.0 Client Authentication and Authorization Grants).  Is that coming in 2017.2?

In order to support it in 2017.1, I'd have to override the OAuth 2.0 token endpoint to cater for the additional grant types - what's the best way to do this?

 

Thanks.

Last answer 6 June 2017 Last comment 13 June 2017
0   0 2
375

views

0

rating

I know the process ID< and I know the global name: ^||testing(index).  From the terminal (and therefore, and different process ID), how do I view the contents of ^||testing() ?  Not the list of process private globals; the contents of this single PPG.

Thanks,

Laura

Last answer 12 June 2017 Last comment 12 June 2017
0   0 3
366

views

0

rating