首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

怎么从数据窗口中获得数据库初始值

2012-02-03 
如何从数据窗口中获得数据库初始值各位:比如说从数据库里retrieve数据窗口某一列某一行取出是5,第一次改3,

如何从数据窗口中获得数据库初始值
各位:比如说从数据库里retrieve数据窗口某一列某一行取出是5,第一次改3,第二次改成4,第三次改成6,这时我要获取原始值5与当前值6。有没有在ACCEPT之后,直接获取原始值5的函数?dw_1.GetItemNumber(row,"colums",Primary!,true)试了不行,true和false获取出来的值是一样的,都是当前值。

[解决办法]
accept之后就只能从数据库取了
[解决办法]
谁说的。试试这个
dwcontrol.Object.Data {.buffer } {.datasource } [ rownum, colnum ] 

ParameterDescription
dwcontrolThe name of the DataWindow control or child DataWindow in which you want to get or set data.
buffer 
(optional)The name of the buffer from which you want to get or set data. Values are:?Primary - (Default) The data in the primary buffer (the data that has not been deleted or filtered out).?Delete - The data in the delete buffer (data deleted from the DataWindow control).?Filter - The data in the filter buffer (data that was filtered out).
datasource 
(optional)The source of the data. Values are:?Current - (Default) The current values in the DataWindow control.?Original - The values that were initially retrieved from the database.
rownumThe row number of the desired item.
colnumThe column number of the desired item.The row and column numbers must be enclosed in brackets and separated by commas.
[解决办法]
dwcontrol.Object.Data {.buffer } {.datasource } [ rownum, colnum ] 和 getitemnumber效果是一样的,accepttext后提取不到原始数据;新建datawindow或者datastore试一下吧。
[解决办法]
dw.Objec.colums.Original[ROW] - 得到从数据库中检索出来的值
dw.Objec.colums[ROW] - 得到当前值

热点排行