Re: adodb.recordset.save and back
From: Peter Plumber (Klempner_at_gmxdot.net)
Date: 03/09/04
- Next message: Werner: "Re: Updateable ADO-Recordset from SProc(WithParameters) on SQLServer ?"
- Previous message: Jack Jackson: "Re: "Select @@IDENTITY" and Access 95/97 ?"
- In reply to: Rinoo Rajesh: "Re: adodb.recordset.save and back"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 09 Mar 2004 09:20:14 +0100
Thx for that hint
seems to be very useful
Peter
Rinoo Rajesh wrote:
> What I can gather from your mail trail below is that you wish to persist a
> recordset into XML (and you have been successful in that) and now wish to
> have a method to update back the data into some table - by loading the
> persisted XML file back into recordset, right?
>
> Well, if you wish to do what i have outlined in the text above, there is no
> straight way, but it is possible. You see, the problem is that it is easy to
> load the XML file back into the recordset (would be a disconnected one at
> that moment anyway) - for example:
>
> Dim Rs as New ADODB.Recordset
>
> RS.Open "XML FILE PATH"
>
> As easy as that!
>
> However, the problem starts when you wish to use the RS.Update or RS.
> UpdateBatch stuff. ADO will throw out an error stating that there is
> insufficient base table information to perform an update. you can't then
> connect to a database and perform
> any batch updates. The problem is that a stand-alone Recordset has an empty
> Source property, and when you reconnect it to the database you get the error
> "Insufficient Base Table Information".
>
> What is missing in a stand-alone Recordset are three field attributes that
> indicate from which database, table and field the
> corrisponding value comes. If you create a new Field object using the
> Fields.Append method you can't specify these properties, nor you can add
> them later because field properties can't be extended.
>
> This can be handled, via XML Schema that you have embedded in the XML
> persisted recordset. At this point, I would like to draw your attention to
> an excellent article on VB2TheMAX titled "Connect a stand-alone Recordset to
> a database using XML". Search it on the google if you can't locate the
> article. It provides sample code and technique to do the stuff.
>
> Let me know if you need more help on this one.
>
> Regards,
>
> Rinoo Rajesh
- Next message: Werner: "Re: Updateable ADO-Recordset from SProc(WithParameters) on SQLServer ?"
- Previous message: Jack Jackson: "Re: "Select @@IDENTITY" and Access 95/97 ?"
- In reply to: Rinoo Rajesh: "Re: adodb.recordset.save and back"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|