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)”.
Oracle.ManagedDataAccess.Client.OracleException:ORA-00911: invalid character
单行SQL如果有换行时,加了;就报上面的错,多行执行的时候,会报下面这种错误
Oracle.ManagedDataAccess.Client.OracleException:ORA-06550: line 1, column 1:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.
虽然从网上能搜索到ExecuteNonQuery执行Oracle多条SQL的时候需要用到以下结构
BEGIN
SQL1;
SQL2;
SQL3;
END;
但是并没有人提到一定要确保整个SQL是一行,必须没有换行!
BEGIN
UPDATE BAANDB.TWHINH225301 A
SET A.T$WVID = -999
,A.T$ASGN = 1
,A.T$PKID = 'Troy'
,A.T$STLO = 'EMS'
WHERE A.T$RUNN = 'CN432789'
AND A.T$PICM = 1
AND A.T$ASGN = 2
AND A.T$PCKD = 2;
UPDATE BAANDB.TWHINH225301 A
SET A.T$WVID = -999
,A.T$ASGN = 1
,A.T$PKID = 'Troy'
,A.T$STLO = 'EMS'
WHERE A.T$RUNN = 'CN432785'
AND A.T$PICM = 6
AND A.T$ASGN = 2
AND A.T$PCKD = 2;
END;
SELECT WarehouseCode,ItemCode,LocationCode = (
STUFF((SELECT ',' + LocationCode FROM WMS_DefaultLocation WHERE WarehouseCode = A.WarehouseCode AND ItemCode = A.ItemCode AND Enabled = 1 AND DeletionStateCode = 0 ORDER BY LocationCode ASC FOR XML PATH('')),1,1,'')
) FROM WMS_DefaultLocation AS A WHERE A.Enabled = 1 AND A.DeletionStateCode = 0 GROUP BY WarehouseCode,ItemCode