Re: adodb.recordset.save and back
From: Peter Plumber (klempner_at_gmxdot.net)
Date: 02/24/04
- Next message: Developer: "Problem with pwd-protected Access .mdb"
- Previous message: Stephen Howe: "Re: slow process when I save a new record"
- In reply to: Peter Plumber: "adodb.recordset.save and back"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 14:28:58 +0100
Hi again,
could anyone please at least tell me that it is no magic function for:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=db1.mdb"
cn.Open
rs.Open Source:="tblUser.xml", Options:=adCmdFile
magic_function rs, cn ' writes the rs to the datasource opened with cn
rs.Close
cn.Close
this is part of my "Not_So_Magic_Function":
Do Until rsSrc.EOF
rsDst.AddNew
For Each fld In rsSrc.Fields
rsDst.Fields(fld.Name).Value = fld.Value
Next fld
rsDst.UpdateBatch adAffectCurrent
rsSrc.MoveNext
Loop
this works but is rather slow compared to
rs.Save "tblUser.xml", adPersistXML
thx
Peter
"Peter Plumber" <Klempner@gmxdot.net> schrieb im Newsbeitrag
news:eGc15yY#DHA.2524@TK2MSFTNGP11.phx.gbl...
> This is what I have:
>
> Dim cn As New ADODB.Connection
> Dim rs As New ADODB.Recordset
>
> cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data
> Source=db1.mdb"
> cn.Open
> rs.Open "SELECT * FROM tblData", cn
> rs.Save "tblUser.xml", adPersistXML
> rs.Close
> cn.Close
>
> and a very nice "tblUser.xml"-file with all the data from tblData
>
> is there a fast way to get the data back from the xml-file into the table
- Next message: Developer: "Problem with pwd-protected Access .mdb"
- Previous message: Stephen Howe: "Re: slow process when I save a new record"
- In reply to: Peter Plumber: "adodb.recordset.save and back"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|