Re: Stale Data
From: JS (js_at_somewhere.com)
Date: 03/18/04
- Next message: Noël Thoelen: "Re: Problem open recordsets"
- Previous message: Sujatha: "Re: Multiple-step operation generated error"
- In reply to: Val Mazur: "Re: Stale Data"
- Next in thread: Val Mazur: "Re: Stale Data"
- Reply: Val Mazur: "Re: Stale Data"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Mar 2004 13:52:54 +0700
the problem is if i change the stale data and call updatebatch, it will
raise an error tell me that 'The row can be located for update....'
but if i delete the stale data and then call updatebatch it just update
smoothly without raising an error that i expected.
here is my code:
Set conn = New ADODB.Connection
conn.CursorLocation = adUseClient
conn.Mode = adModeReadWrite
conn.ConnectionString = "Provider=MSDASQL.1;Data Source=DSApp;"
conn.Open
Set m_rs = New ADODB.Recordset
m_rs.CursorLocation = adUseClient
m_rs.Open strSQL, conn, adOpenKeyset, adLockBatchOptimistic, adCmdText
m_rs.Properties("Update Criteria").Value = adCriteriaAllCols
Set m_rs.ActiveConnection = Nothing
... after some modification or delete of data than
conn.BeginTrans
Set m_rs.ActiveConnection = conn
m_rs.UpdateBatch
conn.CommitTrans
Set m_rs.ActiveConnection = Nothing
- Next message: Noël Thoelen: "Re: Problem open recordsets"
- Previous message: Sujatha: "Re: Multiple-step operation generated error"
- In reply to: Val Mazur: "Re: Stale Data"
- Next in thread: Val Mazur: "Re: Stale Data"
- Reply: Val Mazur: "Re: Stale Data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|