Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Use of ADO with MSDAORA provider

Re: Use of ADO with MSDAORA provider

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Tue, 23 Oct 2001 12:06:52 +0100
Message-ID: <3bd54f8c$0$237$ed9e5944@reading.news.pipex.net>


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...

> 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
>
>
>
Received on Tue Oct 23 2001 - 06:06:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US