Hi ,
I have a recordset which is read from stored procedure(sp).The data in the recordset come from temporarily table in the stored procedure.
After selecting the data into the VB6, i still need to do some finishing process by updating some data to the recordset.
The problem is the recordset does not accept the new value assigned and its value is still of old value.
for example the original value of rRec.Fields("BACK_MARK_1") is "abc", i try to assign it with a new value "456".But the assign fail, it still has value of "abc"
Below is my code:
Set rRec = modDB.StoredProcGetRecADODB(cSQL, "uspPT_BUY_OFF_ASSM_NEW", False, Trim(txtFromPTNo.Text), Trim(txtToPTNo.Text), sCustID, custID)
Dim strWaterMark As String
While Not rRec.EOF
If (IsNull(rRec.Fields("WaterMark").Value) Or rRec.Fields("WaterMark") = "") Then
strWaterMark = getFrozenWaterMark(rRec.Fields("INTERNAL_DEVICE"), rRec.Fields("BOND_NO"), rRec.Fields("MASK_ID"), rRec.Fields("DVALUE"))
rRec.Fields("BACK_MARK_1").Value = strWaterMark
Else
rRec.Fields("BACK_MARK_1").Value = rRec.Fields("WATERMARK").Value
rRec.Update
End If
rRec.MoveNext
Wend
Anyone has idea on this?Help!!
I have a recordset which is read from stored procedure(sp).The data in the recordset come from temporarily table in the stored procedure.
After selecting the data into the VB6, i still need to do some finishing process by updating some data to the recordset.
The problem is the recordset does not accept the new value assigned and its value is still of old value.
for example the original value of rRec.Fields("BACK_MARK_1") is "abc", i try to assign it with a new value "456".But the assign fail, it still has value of "abc"
Below is my code:
Quote:
Set rRec = modDB.StoredProcGetRecADODB(cSQL, "uspPT_BUY_OFF_ASSM_NEW", False, Trim(txtFromPTNo.Text), Trim(txtToPTNo.Text), sCustID, custID)
Dim strWaterMark As String
While Not rRec.EOF
If (IsNull(rRec.Fields("WaterMark").Value) Or rRec.Fields("WaterMark") = "") Then
strWaterMark = getFrozenWaterMark(rRec.Fields("INTERNAL_DEVICE"), rRec.Fields("BOND_NO"), rRec.Fields("MASK_ID"), rRec.Fields("DVALUE"))
rRec.Fields("BACK_MARK_1").Value = strWaterMark
Else
rRec.Fields("BACK_MARK_1").Value = rRec.Fields("WATERMARK").Value
rRec.Update
End If
rRec.MoveNext
Wend