|
见了*了,这么么简单的循环为什么就只采用rst的第一条记录值,那错了,整了一天了,帮帮吧.
dim rst as new adodb.recordset
Dim rs As New ADODB.Recordset
rst.Open "select * from tb_date", cnn, adOpenKeyset, adLockReadOnly
For i = 1 To rst.RecordCount - 1
rs.Open "tb_out", cnn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs(0) = rst(0)
rs(1) = rst(3) * 10 / 100 + rst(6) * 68 / 100 + rst(9) * 22 / 100
rs(2) = rst(2) * 10 / 100 + rst(5) * 68 / 100 + rst(8) * 22 / 100
rs(3) = rst(1) * 10 / 100 + rst(4) * 68 / 100 + rst(7) * 22 / 100
rs.Update
rs.Close
Next i
出来的所有值有是一样的,为什么不next i呢? |
|