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!)
进行假删除,在数据窗口中删除,而数据库中并不删除
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值