FIX: Update Resync Property Not Persisted Properly with XML Format (245358)
The information in this article applies to:
- Microsoft Data Access Components 1.5
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
This article was previously published under Q245358 SYMPTOMS The Update Resync dynamic property cannot be persisted properly when the Recordset
object is saved in Extensible Markup Language (XML) format in releases of
Microsoft Data Access Components (MDAC) prior to 2.5. It only works when the
recordset is persisted in Advanced Data TableGram (ADTG) format. CAUSE The only property that persists properly (in versions of
MDAC prior to 2.5) is the UpdateCriteria rowset property. Update Resync is never persisted. RESOLUTION The following sample code fails in versions of MDAC earlier
than 2.5. Run the code in a new Microsoft Visual Basic project to verify the
behavior: Note You must change User ID=<User ID> and password=<Strong Password> to the correct values before you run this code. Make sure
that User ID has the appropriate permissions to perform this operation on the
database.
Private Sub Command1_Click()
Dim rs As New Recordset
Dim cn As New Connection
Dim var As Variant
Dim var2 As Variant
Dim rs2 As New Recordset
cn.CursorLocation = adUseClient
cn.Open "Provider=SQLOLEDB.1;server=RoseValley;database=test;uid=<User ID>;password=<Strong Password>
rs.Open "select * from testident", cn, adOpenKeyset, adLockBatchOptimistic, -1
rs.Properties("Update Resync") = adResyncUpdates
Debug.Print rs.Properties("Update Resync")
If Dir("C:\test.xml") <> "" Then Kill "C:\test.xml"
rs.Save "C:\test.xml", adPersistXML
rs2.Open "C:\test.xml", , , , -1
Debug.Print rs2.Properties("Update Resync")
End Sub
STATUS
This problem was corrected in MDAC version 02.50.00.3917.
REFERENCES For more information, please refer to the Platform SDK for
Windows 2000.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbBug kbfix kbMDAC250fix kbMSXMLnosweep KB245358 |
---|
|