MakeToday的专栏

蓝色忧郁

dbcancel,reset,reselectrow
从库中重新检索数据,并更新当前行的显示和状态
This statement reselects the clicked row if the update is not successful:
更新失败后,重前检索该数据
IF dw_emp.Update( ) < 0 THEN

        dw_emp.ReselectRow(dw_emp.GetClickedRow())

END IF
reset
清除数据窗口中的所有数据(不影响数据库中数据)
In a DataWindow whose Retrieve As Needed option is on, this example cancels the retrieval before resetting the DataWindow:
dw_employee.DBCancel()
dw_employee.Reset()   撤消数据查询,并清空当前绶冲区

应用二
不断动态指定  dataobject时,
用于清除先前数据的绶冲区



RowsDiscard
Use RowsDiscard when your application is finished with some of the rows in a DataWindow control and you don't want an update to affect the rows in the database. For example, you can discard rows in the delete buffer, which prevents the rows from being deleted when you call Update.

This statement discards all the rows in the delete buffer for dw_1. As a result if the application later calls dw_1.Update(), the DataWindow will not submit SQL DELETE statements to the DBMS for these rows:
dw_1.RowsDiscard(1, dw_1.DeletedCount(), Delete!)
进行假删除,在数据窗口中删除,而数据库中并不删除
阅读更多
个人分类: Power Builder
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

dbcancel,reset,reselectrow

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭