.NET

Syndicate content 14 

I'm attempting to use the .NET Entity Framework provider that is provided by InterSystems (see: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GBMP_eframe).  In our environment, the "Support Delimited Identifiers" option is turned off and we are not allowed to turn it on without significant testing effort.  When this setting is off, the SQL that is generated by the Entity Framework provider is not considered valid and therefore the provider doesn't work (it DOES work, however, when this setting is turned ON).

Do you know of any way to work around this issue? Again, we don't have the option of turning the "Support Delimited Identifiers" option ON unfortunately.

Last answer 4 April 2019 Last comment 9 April 2019
0   0 1
37

views

0

rating

Dear Colleagues and Friends,

is there any indication that the .NET object representation of Cache objects (i.e. InterSystems.Data.CacheClient.dll) complies with .NET Standard? I'm planning to extend our existing .NET client/server solution with a mobile option by Xamarin Forms and can't find any significant hints in the internet.

I'm just fooling around a bit and made some expreiments with a REST API and a generic object-to-JSON tier

Last comment 1 April 2019
0   0 2
0

answers

54

views

0

rating

InterSystems states that Caché supports at least three data models – relational, object and hierarchical (globals). On can work with data presented in relational model in a program written on C# the same way one works with any other relational DB. To work with data presented by object model in C# one needs to use .NET Managed Provider or some kind or ORM. And starting with version 2012.2 one can work directly with globals (or use direct access to hierarchical data) via Caché eXTreme for .NET

Last comment 19 March 2019
+ 4   2 5
454

views

+ 4

rating

Edit:

May have found the issue but not the solution.

"SELECT * FROM wmhISTORYdETAIL" runs as a passthrough without asking for the DNS.

but

'SELECT Count([wmhISTORYdETAIL].[HistHMNumber] AS CountOfHistHMNumber FROM [wmhISTORYdETAIL] WHERE ((([wmhISTORYdETAIL].[HistMovType])='Receipt') AND (([wmhISTORYdETAIL].[HistMovDate])>=Date()-1) AND (([wmhISTORYdETAIL].[HistMovDate])<Date()));'

asks for the DNS but both are linked to a table that has the password saved.

Any Ideas please?

Rob

Hi

I have created an MS Access database with a passthrough query to our Intersystems Cache WMS system. If I use "SELECT * from thetable"  as the passthough query I can use VB.NET to query the passthrough and it works fine but this dataset getting rather large so I changed it to

"Select field1, field2, filed3 from thetable" but the passthrough no longer works as it did.....it works in MS Access but not from the VB.NET app

0   0 0
0

answers

0

comments

50

views

0

rating

Hi All,

Is it possible to call a Cache Routine using the .NET Cache Client instead of just SQL statements?

If so, can someone provide an example?

using InterSystems.Data.CacheClient;
using InterSystems.Data.CacheTypes;

Thanks,

-Matt

Last answer 24 January 2019 Last comment 4 February 2019
0   1 2
133

views

0

rating

Hi

we are trying to call a Webservice that is hosted on a Ensemble production from a .net program.

The web application in ensabmle is defined with password authntication 

we can't get to set the security header in the .net program  (<soapenv:Header> ... <wsse:Security ... <wsse:UsernameToken  ... ) in SoapUI we added the Wss usertoken and it worked like a charm.

Doe's anyone have a idea to guide us? (links,  ,samples, etc. )

Thanks

Gadi

0   0 2
0

answers

0

comments

91

views

0

rating

Does developing a RESTful API in Caché remove the requirement to use the InterSystems.Data.CacheClient.dll and generate proxy classes using the Caché Object Binding Wizard for .NET web development? If anyone has links to sample applications using .NET with Caché and REST Services, I would be grateful if you could share them.

Last answer 19 April 2018 Last comment 20 April 2018
0   0 2
222

views

0

rating

Integrating Cache with .net may be difficult, as we need to know both technologies and tools involved. Let’s follow the simplest possible example and see the pitfalls lurking on our way.

 

1. Creating .Net Assembly

 

.Net assembly is unit that contains compiled code and other resources.

Let’s create the simplest .Net assembly that will contain the code we want to execute.

 

We will use assembly of type Class Library, as we will use classes and their methods contained within. This type of assembly has .dll extension.

For this the easiest way is to use Visual Studio 2015, you can use free edition.

 

Visual Studio introduces some concepts:

Solution – File that contains collection of Projects and files that together allow creating your product.

Project – collection of files containing Source Code, resources such as images, configuration files etc.

Last comment 2 January 2018
+ 4   0 7
861

views

+ 4

rating

I ran the below query in three different modes.  Coordinated Universal Time is 5 hours ahead of Eastern Time so there is difference in value from column 1 and column 2 in ODBC, Display mode, but not in Logical Mode. By default the query executes in ODBC mode when we query the data from outside world(via ODBC connection). 

I don't know  why query 2 and query 3 outputs different from query 1.

Query 1. Ran in Logical mode, DATEPART() took in memory stored timestamp data(stored in UTC)

'Hour ' returned are same for both the columns

Query 2. Ran in ODBC mode, DATEPART() took in memory stored timestamp data(stored in UTC) ,but column1 converts data from logical mode to display mode while column 2 is still in logical mode .

Last answer 23 November 2017 Last comment 24 November 2017
0   0 1
139

views

0

rating

I have a main page in .NET where I call a Dashboard created in DeepSee like this:

<iframe src="../..zen?DASHBOARD=NameofDashboardKpi1.dashboard&EMBED=1&CacheUserName=&CachePassword=" 

to display the Dashboard in the .NEt page.

 

My problem is that connection to every Dashboard takes a while, so performance is low.

Any suggestion?

Last answer 2 September 2017 Last comment 25 September 2017
0   0 2
173

views

0

rating

 

My scenario is:

 

I have a Cache method that

call a REST -> JSON -response  > INSERT/UPDATE the source table of a DeepSee Cube -> Update the Cube only for this change -

I want to view in .NET Application the changes. For that I want that this method should be executed at a defined interval.

Or maybe the solution is a Refresh button in .NET page. is there any way to access a Cache method from .NET?

Any idea how to do it?

 

 

Last answer 8 September 2017
0   0 1
0

comments

174

views

0

rating

We have some productions in Ensemble that uses DotNetGateway to use dll created with .Net. The DotNetGateway is configured with a port number, and then the operation uses that port.

But sometimes, suddenly Ensemble answers that the port is already in use, but it is only used by the DotNetGateway. And the only way to resolve this and make the port available again, is to restart the full server. We have tried to restart Ensemble, to kill the process that may be using the port and nothing. Is there any way to make a DotNetGateway port "stay connected" or 
something to search who is occupying the port and release it?

Last answer 18 August 2017
0   0 0
0

comments

113

views

0

rating

Hello,

I'm currently exploring alternatives to CSP/services and ODBC/Sql Maps for access to Caché. I'm not seeing a library which would interest me, so am considering creating one myself.

Does 'CacheConnection' in C# use RPC of some sort, or a defined protocol to communicate with Caché, or does it do so over telnet with scripted commands? I would assume the former. If so, is this a publicly documented protocol that can be implemented by library developers?

Any guidance in this area would be appreciated.

Last answer 6 July 2017 Last comment 6 July 2017
0   0 1
493

views

0

rating

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

301

views

0

rating

   

  The following code in .Net using  CacheObject.dll  version 2016.1.2.206 com library

                  ConnectionString  =  "cn_iptcp:10.56.135.160[1972]:PHDEMO:PHSYSADM:***********" 

                  b = factory.Connect(ConnectionString  )
                  objCacheObject =  factory.Static("CacheObjectConnection")     
                  clist  = factory.GetConnectionList()

  for the above code, b is true and clist is  Local,cn_iptcp:127.0.0.1[1972]: 

Why isn't the 10.56.135.160 in the connection list?  Next the program runs a function written an early version of Cache. This function returns NULL.  Are the early versions compatible?

Last answer 14 February 2017
0   0 0
0

comments

193

views

0

rating

Imagine that your .NET project uses the Caché DBMS and you need a fully-functional and reliable authorization system. Writing such a system from scratch would not make much sense, and you will clearly want to use something that already exists in .NET, e.g. ASP.NET Identity. By default, however, this framework supports only its native DBMS – MS SQL. Our task was to create an adaptor that would let us quickly and easily port Identity to the InterSystems Caché DBMS. This work resulted in creation of the ASP.NET Identity Caché Provider.

MSSQL is the default data provider for ASP.NET Identity, but since Identity’s authorization system can interact with any other relational DBMS, we implemented this functionality for InterSystems Caché

Last comment 25 January 2017
+ 4   0 3
768

views

+ 4

rating

Recently I came across a very strong statement to the effect that InterSystems.Data.CacheClient.dll library works fast because it does not open a TCP/IP connection, instead it works in the same process as a database. It made me pause for quite some time. Firstly because .Net Managed Provider, which utilises this library, opens TCP/IP connection to the database (and it is stated in the documentation "Using .NET and the ADO.NET Managed Provider with Caché"). And secondly, because as far as I know only eXtreme applications attach themselves to the process. Besides, CacheClient for the most part just implements the functionality of the Caché system and user classes. And in .Net Managed Provider architecture Caché Object Server is responsible for connection to a database.

So who is right and who is wrong? Is it correct to state that CacheClient.dll operates in the same process as a database or is it just inapplicable? Will be really grateful for your thoughts and input.

Last comment 16 January 2017
+ 1   0 5
0

answers

743

views

+ 1

rating

Hi!

I'm trying to connect to one of our Ensemble servers Cache database from a C#-windows form . I'm running the client from my local computer with OS win7.  Using .NET FW ver 4.5.2 in the client.

ODBC local setup using "Intersystem ODBC35"

In this ODBC konfigurationview i can put my userID and password and try a testconnect (or ping). And that run successful.

However, we don't want to leave credentials in the ODBC-configuration it self (open up for anybody to use the source) but instead send it from the klients.

I have try all three ways from https://www.connectionstrings.com/cache/ and they all return  odbc-errors in different ways.

But if i just use:  "cn.ConnectionString = "Dsn=MyDSN" it works and it seems to use the credentials configured in DSN.

I'm using Ensemble version 2015.1 local and server i try to connect to via odbc is running ver 2014.

0   0 3
0

answers

0

comments

169

views

0

rating

I have posted to aid others in diagnosing problem with SSL/TLS connections to superserver port from .NET client executable.

The cache instance this appeared on is quite old - 2011 - so I do not know if Intersystems have added a better error message in a later version

The actual fault was due to the certificate in the %SuperServer SSL/TLS configuration having expired.

The unhelpful message that appeared in the .NET client included the following partial stack trace.

0   0 3
0

comments

281

views

0

rating

Microsoft Office has components for using in third party applications: COM Objects for C++ and Interop Assemblies for .Net programming.

Many Cache projects used to include calls to those libraries. However, recently this solution started being problematic.

There are two main reasons - legal and technical. Let’s check the details.

Microsoft technology support

Microsoft is supporting Office Automation only for desktop computing. 

It shall not be used for server computing, as they offer Sharepoint for this scenario. Have a look here:


"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office 
applications from any unattended, non-interactive client application or component (including ASP, 
ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behaviour and/or deadlock when 
Office is run in this environment.

+ 1   0 1
0

comments

245

views

+ 1

rating

Hi,

We have created a dll with .Net that generates a MS Word document with a template. The .Net method works, we have tested it with Visual Studio and it generates the document.

But once we have created the dll and embebed it in Ensemble through the Wizard, when we try to execute the method that generates the document, it doesn't work. It doesn't throw us an error, it simply doesn't open the template.

We have seen that MS Word program is opened, but that's all.

We are using Microsoft.Office.Interop to generate the Word document. It must be Word 97 version document.

What are we missing? Are we doing something wrong?

Thanks

Last answer 27 October 2016 Last comment 28 October 2016
0   0 2
359

views

0

rating