Help with Updatebatch with adPersistXML in Access
- From: "Daniel" <no_spam_sonofsmog@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Mar 2006 11:43:21 -0800
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.
.
- Prev by Date: Re: Best way to find ID of new record
- Next by Date: DBNull values when reading text delimited file
- Previous by thread: 2 tier or 3 tier model?
- Next by thread: DBNull values when reading text delimited file
- Index(es):
Relevant Pages
|
|