Dear all,
Following is my code. I want to know why I can still update the recordset and the result is reflected in the database even I am using adOpenForwardOnly? Thanks
Code:aStrsql = " select ...from ... where ..." If fn_SqlOpenRS(aRs, aStrsql, adCmdText, gConnect_Main, adUseServer, adOpenForwardOnly) Then i = 0 While Not aRs.EOF ' do some calculation.. aRs!s_totalAmount = aRs!r_totalAmount .. aRs!s_last_update_time = Now aRs!s_remark = "SW_frmMassUpdate -> f_confirm_Redem -> From Corresponding Redemption" aRs.Update i = i + 1 aRs.MoveNext Wend Call fn_closeADOrs(aRs) Else MsgBox ("Error in opening the query."), vbCritical, gProjectName_SW End If




Reply With Quote