We are creating a package (written in Caché Object Script) that will provide access to an external DB (MySQL). Because applications that use our package will be run from machines with various, potentially unexpected, operating systems, we’d like to establish a connection to the external DB without using DSNs (we’ve heard that setting up DSNs on certain non-Windows machines can be cumbersome and problematic).
I'm trying to perform a SELECT with parameters using the EnsLib.SQL.OutboundAdapter. The SELECT returns results but seems to discard the parameters I try to send. I have tried two methods.
Set par(1) = "20160630" Set par(1,"SqlType") = 12 Set sql = "SELECT Cod, Ing, score FROM [bbdd].[dbo].[vw_Test] WHERE MyParam >= '?'" Set tSC = ..Adapter.ExecuteQueryParmArray(.QueryResultSet,sql,.par)
Hi, after installed Healthshare 2015.2, all the tables previously correctly listed working with Healtshare 2014.1 are NOT listed anymore. TrakCare tables are not listed in the catalogue, nor by the WinSQL Intellisense.
Does anybody know a trick or have a hint to resume this useful functionality back?
I also have a Caché server with "downloadedposts" table.
They are connected from Caché to MySQL via SQL Gateway
I want to keep Caché table synced with MySQL one (MySQL "posts" table is a master copy), so periodically Caché queries MySQL server and downloads data. So far so good, and if a record appears or changes in MySQL table, Caché downloads the changes.
The problem I'm encountering is that sometimes rows would be deleted from MySQL "posts" table.
I'm trying to rewind a cursor back to the first row after looping part of the way through the implied result set, but I'm not finding a way to make this happen, is there some such iterator variable or directive that I can leverage to accomplish this?
I could code around it by pulling identifiers and/or values into a local array, and then hand code up an iterator over my local results copy, but this feels like a "redesigning of a wheel" approach, and I thought I would check before I start down this path.
Hello, is there a way to reset all of the Sample Classes back to their "Installed State."? In other words, delete all the other classes I have put into the samples namespace and leave only those classes that were there when I installed the instance.?
Recently I was asked by a customer with this question. In MS SQL Server, there is a function called host_name() that will return the work station name.
Here is how I would do it in Caché :
With default SQL schema name, in my case SQLUser in SQL (which is equivalent as User in Caché class definition), I have a class called User.dummy, I added a classmethod called hostname and expose it as SQL function host_name:
This is a bit weird. I'm trying to use `DATEDIFF()` to calculate the time since the last message on an interface. For some reason, when no messages are received, the number steadily decreases. This is the opposite of what should happen. Here is my current query and a few sequential result sets:
SELECT getDate() as now, max(TimeCreated) as latest, DATEDIFF (s,getdate(), max(TimeCreated)) as difference
I have two servers in our TEST environment. One with HSBUS and one with HSREGISTRY. Let's call them "HSBUS01" and "HSDB01" respectively.
Now, I can access HSBUS with my SQL client by using the JDBC driver pointed to hsbus01.full.name.com and port 1972 and specifying a namespace of "HSBUS". I am, however, unable to access the HSREGISTRY instance via SQL with a similar combination of information.
I have to disect thousands upon thousands of strings like this:
I've been able to pull out the first, second and final segments as separated by hyphens, but now I have a predicament where I need to use the second segment, the 2 shown in the example above, in a join to another table. Problem is Cache apparently doesn't like doing that. Just the same, I have to find a way.
Here's the code I'm using to pull that segment out into as separate field in the query results:
In my project, I am calling a store proc on third party database. I am using SQL Gateway and ODBC. Everything is working fine until the store proc changed. In store proc they have changed the return alias name for a column. In Ensemble Snapshot I am not seeing the modified alias name until I restarted the whole Healthshare instance.
Here is my question, is there any other way? We do not want to take the instance down if it happens after we go live.
What is the recommended approach to handle the following scenario: Large number of HL7 messages are serviced via Ensemble. Those messages are then transformed and routed to an Operation which calls a web service which does a number of different activities. If will do address normalization, location geo coding, MPI lookup and resolution, and insert into a SQL Server database to stage for an analytics product. Unfortunately all of this work takes time and the first thing that happens in the web service is a lock taken out on the Patien in SQL Server.
Is there any simple way to query data about processed messages in all Ensemble productions?
What I ultimately would like to do is to periodically export that data to another system and run statistics on it.
I've been digging around in the SQL tables view and Ens.MessageHeader seems to contain most of what I'm after.
Using ODBC I could access that table view and query data, but only for one namespace per DSN it seems.
New to CSP and Zen. I've been going through tutorials and have made some progress. Using the "Contacts" tutorial as an example, I'm trying to create a "ViewContact" page. I want this to be linkable so I'm using URI Parameters, which I understand. However, what I'm not sure about is how to retrieve a specific record. Should I use a SQL statement? If so, how?