我有用于表Customer的表Customer缓冲区gbufOrder的缓冲区bufCustomer。 但是这段代码不起作用,我写的代码就像 找到bufCustomer其中bufCustomer.CustomerID = gbufOrder.CustomerID no-lock no-error。 但如果我检查表数据,数据就在那里,但如果我写了一个像上面的代码它不工作。 有没有其他方法来获得价值观?
答案 0 :(得分:1)
W /缓冲液:
DEFINE BUFFER gbufOrder FOR Order.
DEFINE BUFFER bufCustomer FOR Customer.
FIND FIRST gbufOrder NO-LOCK NO-ERROR.
IF AVAILABLE(gbufOrder) THEN
DO:
FIND bufCustomer where bufCustomer.CustNum = gbufOrder.CustNum NO-LOCK NO-ERROR.
IF AVAILABLE(bufCustomer) THEN
DO:
DISP bufCustomer.name.
END.
ELSE
DO:
MESSAGE "Customer is not available!"
VIEW-AS ALERT-BOX ERROR BUTTONS OK.
END.
END.
ELSE
DO:
MESSAGE "Order is not available!"
VIEW-AS ALERT-BOX ERROR BUTTONS OK.
END.
没有BUFFER
FIND FIRST Order NO-LOCK NO-ERROR.
IF AVAILABLE(Order) THEN
DO:
FIND Customer where Customer.CustNum = Order.CustNum NO-LOCK NO-ERROR.
IF AVAILABLE(Customer) THEN
DO:
DISP Customer.name.
END.
ELSE
DO:
MESSAGE "Customer is not available!"
VIEW-AS ALERT-BOX ERROR BUTTONS OK.
END.
END.
ELSE
DO:
MESSAGE "Order is not available!"
VIEW-AS ALERT-BOX ERROR BUTTONS OK.
END.
此程序适用于sports200
示例数据库(位于PROGRESS / OpenEdge安装目录中)
更新: