Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

query on MUMPS from asp.net/C#

Tags:

c#

mumps

Does anybody know how to query from MUMPS database using C# without using KBSQL -ODBC?

We have requirement to query from MUMPS database (Mckesson STAR Patient care) and when we use KBSQL it is limited for 6 concurrent users. So we are trying to query MUMPS directly without using KBSQL.

I am expecting something like LINQ TO MUMPS.

like image 762
porhills Avatar asked Dec 14 '22 02:12

porhills


2 Answers

I think Mckesson uses Intersystems' Cache as its mumps (M) provider. Cache has support for .Net (see the documentation here). Jesse Liberty has a pretty good article on using C#, .Net and Windows Forms as the front end to a Cache database.

I'm not sure about LINQ (I'm no expert here), but this might give you an idea as to where to start to get your project done.

Michael

like image 152
igotmumps Avatar answered Dec 16 '22 16:12

igotmumps


First off, I too feel your pain. I had the unfortunate experience of developing in MagicFS/Focus a couple of years back, and we had the exact same request for relational query support. Why do people always want what they can't have?

Anyway, if the version of MUMPS you're using is anything like MagicFS/Focus and you have access to the file system which holds the "database" (flat files), then one possible avenue is:

  1. Export the flat files to XML files. To do this, you'll have to manually emit the XML from the flat files using MUMPS or your language of choice. As painful as this sounds, MUMPS may be the way to go since you may not want to determine the current record manually.

  2. Read in the XML using LINQ to XML

  3. Run LINQ queries.

Granted, the first step is easier said than done, and may even be more difficult if you're trying to build the XML files on the fly. A variant to this would be to manage generation of the XML files like indexes, via a nightly server process or the like.

If you're only going to query in specific ways (i.e. I want to join Foo and Bar tables on ID, and that's all I want), I would consider instead pulling and caching that data into server-side C# collections, and skip querying altogether (or pull those across using WCF or like and then do your LINQ queries).

like image 44
emptyset Avatar answered Dec 16 '22 17:12

emptyset