Help with Updatebatch with adPersistXML in Access



I am trying to update a table in access 2000 with an XML persisted
recordset. The persisted recordset was generated by calling .Save , ,
adPersistXML with SQL Server 2000 as the datasource. (The structure of the
Acess table and the SQL Server table are identical). I next try to import
the table into an Access 2000 Jet 4.0 database like so:

Dim Cnxn As ADODB.Connection
Dim recVRT As ADODB.Recordset
Dim strCnxn As String

' Open connection
Set Cnxn = New ADODB.Connection
With Cnxn
.Open ("Driver={Microsoft Access Driver (*.mdb)};Dbq=" &
g_strDataPath & "\" & g_strDatabaseFileName & ";Uid=Admin;Pwd=;")
End With

' update recordset
Set recVRT = New ADODB.Recordset
With recVRT
.CursorLocation = adUseClient
.Open g_strDataPath & "\mytable.xml", , adOpenStatic,
adLockBatchOptimistic, adCmdFile
.ActiveConnection = Cnxn
.UpdateBatch
End With
Set Cnxn = Nothing
Set recVRT = Nothing

VB 6.0 does not report any errors but the recordset does not update. What am
I doing wrong. BTW: I am attempting the import on Windows 2000 SP4 with MDAC
2.8 SP1 and VB 6 SP5.

Any help would be greatly appreciated.

--
Daniel Blackmon
Project Lead - Software Engineer
Worldwide Environmental Products Inc.


.



Relevant Pages

  • Re: select statement and number of rows returned
    ... Recordset object, it has a property called RecordCount. ... Dim rstPublishers As ADODB.Recordset ... Set Cnxn = New ADODB.Connection ... Set rstPublishers = New ADODB.Recordset ...
    (microsoft.public.data.ado)
  • Re: access 2003
    ... Dim ctl As Control ... Dim rs As Recordset ... This sets the query definitions for choosing data to create an invoice using ... Event on combo box: Private Sub ChooseCust_AfterUpdate ...
    (microsoft.public.access.conversion)
  • Re: A simple problem with MoveFirst
    ... update the table (rather than using the recordset) means that from ADO's ... Dim tbDataToBeEmailed As ADODB.Recordset ... tbDataToBeEmailed.Open "tbDataToBeEmailed", cnCurrent, adOpenKeyset, ... "You have not entered time into the ACIS ...
    (microsoft.public.access.modulesdaovba)
  • Re: macro error due to editor
    ... Your VBA code never sets DB or the Recordset variables to Nothing. ... Do you declare DB as a global variable anywhere in the database file (e.g., ... EmpDateAs String ... Dim DB As Database, Qry As QueryDef, Qry_def As String ...
    (microsoft.public.access.macros)
  • Re: DAO MUCH faster than ADO in this test
    ... DAO is well-known to be faster than ADO. ... Of course the DAO loop ran faster than the SQL loop; ... advantage of a table-type recordset, which only works on local tables. ... Dim starttime As Single, finishtime As Single ...
    (microsoft.public.access.modulesdaovba)