To guarantee referential integrity, the Baan/LN Database stores reference counters, which indicate how many times a record is used in a parent child relation. Since baan/LN can store each data in a several different database, we can not use the referential integrity mechanisms of the database itself. The field Refcntd stores the number of delete constraints to a record, the Refcntu stores the number of update constraints to a record.These fields are automatically added to each Baan table so you do not have to add them manually.
Only if the reference counter is zero, can the parent record be deleted. Reference counters are only applicable if the Referential Control Delete Mode (refcntd) or Referential Control Update Mode (refcntu) in the relation is “Restricted (with counter)”.
这就造成了当使用HttpWebRequest访问时，不成功就会出现System.Net.WebException: ‘The remote server returned an error: (500) Internal Server Error.’报错（如下图），获取不到结果了。
//500 error but get the message
res = (HttpWebResponse)webRequest.GetResponse();
catch (WebException ex)
res = (HttpWebResponse)ex.Response;
StreamReader sr = new StreamReader(res.GetResponseStream() ?? throw new InvalidOperationException(), Encoding.UTF8);
var result = sr.ReadToEnd();