Hi Dmitriy,

$ZF(-1) has no chance for a timeout it is strictly synchronous

So $ZF(-2) and Looping for a result might be a workaround
$ZF(-100,"/ASYNC", ...) may do the same. See details

Both need to run the external routine in a script that documents its completion in some file and you check it.

A different approach could be a Command Pipe (CPIPE) where you read the result with a timed READ.
It's basically the same

Hi Scott!

Happy new year! 
You are right ZEN is out but CSP is not.
With ZEN you might have implemented inline editing.
But is rather simpler to achieve an acceptable result  (except coloring) if you separate editing from table view.

The generated page has a SEARCH page that should be easy to configure. <CSP:SEARCH>
And if you force the generated page to start with the search page with maxrows=25 you might cover the needs I understood.

This were my changes:
<head>
<title>Cache Server Page - Sample.Person (SAMPLES)</title>
</head>
<!-- start with search page -->
<body onload='form_search()'>
<h1 align='center'>

and at end:
</form>
</body>

This is the extended CSP:SEARCH tag:

<!-- use csp:search tag to create a javascript function to invoke a search page -->
<csp:search name='form_search' 
 classname='Sample.Person' 
 where='ID,Name,DOB,Home.City,Home.State' options='clearbtn,sortbox' 
 PREDICATES="%startswith,=,contains" MAXROWS=25
 SELECT = 'ID,Name,DOB,Home.City,Home.State,Home.Street,Home.Zip' 
 >

I did the example in namespace SAMPLES

Hi Jeff,

After some playing around it was clear that any error in a procedures ends up with <-149>:<SQL Function encountered an error>
as you found out yourself.

To have <-400> the error must happen at the top level of your SQL statement .
Using your initial SqlProc
If you add an argument to your SELECT ....., 1/HL7.Message.Get(pid) as found ....

you get a useless 1/tMsg.Read(tMsg.Size) value

but you get 

[SQLCODE: <-400>:<Fatal error occurred>]
[%msg: <Unexpected error occurred: <DIVIDE>%0AmBuncommitted+4^%sqlcq.USER.cls34.1>]

enforced by a 0 return value.

That's just half of the request and I see no way  to influence %msg variable
So you can enforce a STOP of your query. 

I think it's both

#1 missing a lot of important countries

#2 wrong (or very aged)  since FRANCE: 20  would mean to have 1 employee by customer . This simply can't match.
I think a look at the WRC registry might give some feeling on the dimensions.  (without disclosing details)  

For my case 5 yrs back picking out 1 of my partners which had >30 installations at 30 companies.
Could be they count "Intersystems Only"  -  but that's not stated nor does it make sense.

walking through their web pages you see fast who is their preferred product supplier. no need to mention

Attention!

The list of companies from enlyft.com is totally wrong.
Even if you just look at Electronic Health Record  you miss important countries like whole Scandinavia, Italy, Germany, China, ...
and beyond that whole middle and eastern Europe and especially Russia. Where is Japan ?

Just as a signal how massively wrong these figures are:
My small Austria has more companies using Intersystems products than this 26 counting for India.

I'd suggest you contact Intesystems Marketing for REAL figures.
Your source is just faked information.

the issue is here:

Method RtnReceive(RtnName As %String, 
  RtnLines As %ListOfDataTypes(ELEMENTTYPE="%String",
  XMLITEMNAME="RtnLinesItem",XMLNAME="RtnLines")) As %String [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{

use instead ELEMENTTYPE="%VarString",

 %VarString inherits from %String all except pre-define MAXLEN=50

A few recommendations to improve performance:

#1) %TimeStamp  is a nice thing for display tough rather inefficient for indexing as it is mostly close to a unique index.
If you just check for Date as you describe you better use an index on a calculate property of type %Date
instead of a string, your date values in index are just integers !!! 
that makes your index slim and fast.

#2)
check for = is the easiest one, therefore, the fastest
check for > is the slowest as you have no stop condition
between is somewhat better as you have to check > and <  but you have a start / stop delimited range.

And integer compare is by dimensions faster than any string compares with any available processor chip.
And you do lots of them!

in reality, better check the number of Global references and lines you execute.
That's the truth.  Costs are good guesswork based on generic parameters out of tune table but rather for the dimension.

map  your MS SQL Table to a class using SQL gateway

in Studio create a new CSP page

<html>
<head> <!-- Put your page Title here -->
<title> Cache Server Page </title> </head> <body>
<!-- Put your page code here -->
My page body
</body>
</html>

use Tool / Templates  / WebForm Assistant
select your Class and the Properties you need
compile  it
use it