Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Use of ADO with MSDAORA provider
What error message do you get?
-- Niall Litchfield Oracle DBA Audit Commission UK "Gregory Volkonsky" <gregoryvo_at_hotmail.com> wrote in message news:3bd52d1b$1_at_nntp.kla-tencor.com...Received on Tue Oct 23 2001 - 06:06:52 CDT
> I have some problem with ADO using MSDAORA provider:
> The following is algorithm of the problem:
>
> 1. Connect to Oracle with MSDAORA provider
> 2. Select rows from any table into recordset
> 3. Save recordset into file in XML format
> 4. Open this file by another recordset.
> 5. Open connection to the same DB
> 6. Save data from file into DB back (previously this data was removed from
> DB)
>
> The following is code:
> To save into XML file:
> Dim cn As New ADODB.Connection
>
> Dim rst As New ADODB.Recordset
>
> cn.Open "Provider=MSDAORA;Data Source=OMER1", "GREG", "GREG"
>
> rst.Open "SELECT * FROM x", cn, adOpenDynamic, adLockOptimistic, adCmdText
>
> 'For sake of illustration, save the Recordset to a diskette in XML
> 'format.
> rst.Save "c:\Stam\pubs.adtg", adPersistADTG
> MsgBox "Save into file is done!"
> rst.Close
> cn.Close
>
>
>
>
> To take the data from XML file back to DB:
>
> Dim cn As New ADODB.Connection
> Dim rst As New ADODB.Recordset
>
> 'If there is no ActiveConnection, you can open with defaults.
> rst.Open "c:\Stam\pubs.xml"
>
> 'Connect to the database, associate the Recordset with the connection,
> 'then update the database table with the changed Recordset.
> cn.Open "Provider=MSDAORA;Data Source=OMER1", "GREG", "GREG"
> rst.ActiveConnection = cn
>
> rst.Update // HERE THE PROGRAM FAILS
>
> Please help
>
>
>
![]() |
![]() |