Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Use of ADO with MSDAORA provider
I have some problem with ADO using MSDAORA provider:
The following is algorithm of the problem:
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 - 03:40:01 CDT