How to change ADO recordset retrieved from Oracle into new recordset 
Author Message
 How to change ADO recordset retrieved from Oracle into new recordset

Hi,

I retrieved data into an ADO recordset from an Oracle database and then made
changes to the recordset. Instead of updating the database, I want to change
the retrieved recordset into a new recordset and then insert the new
recordset into the same database as completely new rows.

Is there a way to do the above?  Can I change the status of records in the
recordset such that the records are recognized as new reocrds when updaing
the database?

Thank you very much.

Sheldon Wang



Fri, 19 Nov 2004 01:13:50 GMT  
 How to change ADO recordset retrieved from Oracle into new recordset
Hi,

You cannot change status of records on opened recordset. What you could do
is to save recordset into XML file/stream and change records' status from
updated to inserted there, then load XML back into recordset, reconnect
recordset to DB and call UpdateBatch to insert new records into DB

--
Val Mazur
Microsoft MVP


Quote:
> Hi,

> I retrieved data into an ADO recordset from an Oracle database and then
made
> changes to the recordset. Instead of updating the database, I want to
change
> the retrieved recordset into a new recordset and then insert the new
> recordset into the same database as completely new rows.

> Is there a way to do the above?  Can I change the status of records in the
> recordset such that the records are recognized as new reocrds when updaing
> the database?

> Thank you very much.

> Sheldon Wang



Fri, 19 Nov 2004 19:21:03 GMT  
 How to change ADO recordset retrieved from Oracle into new recordset
Hi Val,

Thank you very much for your help. I know how to save a recordset into an
XML stream and retrieve it back to a recordset.  I went through the
ADODB.Stream object, But I did not find a method or property to "change
records' status from
updated to inserted ".  Could you provide further assistance such as a
sample code or point me to a place where I can get more information?

Thanks again.

Sheldon Wang

Quote:

>Hi,

>You cannot change status of records on opened recordset. What you could do
>is to save recordset into XML file/stream and change records' status from
>updated to inserted there, then load XML back into recordset, reconnect
>recordset to DB and call UpdateBatch to insert new records into DB

>--
>Val Mazur
>Microsoft MVP



>> Hi,

>> I retrieved data into an ADO recordset from an Oracle database and then
>made
>> changes to the recordset. Instead of updating the database, I want to
>change
>> the retrieved recordset into a new recordset and then insert the new
>> recordset into the same database as completely new rows.

>> Is there a way to do the above?  Can I change the status of records in
the
>> recordset such that the records are recognized as new reocrds when
updaing
>> the database?

>> Thank you very much.

>> Sheldon Wang



Fri, 19 Nov 2004 22:37:15 GMT  
 How to change ADO recordset retrieved from Oracle into new recordset
Hi,

It depends on providers capabilities and format could slightly very,
depending on it. Try to do next. Open records, disconnect it from db and
update one record. Also add new record into recordset and save recordset
into XML file. Open file using some tools, like IE browser. You should see
records, which record was updated and which one was inserted.

--
Val Mazur
Microsoft MVP


Quote:
> Hi Val,

> Thank you very much for your help. I know how to save a recordset into an
> XML stream and retrieve it back to a recordset.  I went through the
> ADODB.Stream object, But I did not find a method or property to "change
> records' status from
> updated to inserted ".  Could you provide further assistance such as a
> sample code or point me to a place where I can get more information?

> Thanks again.

> Sheldon Wang


> >Hi,

> >You cannot change status of records on opened recordset. What you could
do
> >is to save recordset into XML file/stream and change records' status from
> >updated to inserted there, then load XML back into recordset, reconnect
> >recordset to DB and call UpdateBatch to insert new records into DB

> >--
> >Val Mazur
> >Microsoft MVP



> >> Hi,

> >> I retrieved data into an ADO recordset from an Oracle database and then
> >made
> >> changes to the recordset. Instead of updating the database, I want to
> >change
> >> the retrieved recordset into a new recordset and then insert the new
> >> recordset into the same database as completely new rows.

> >> Is there a way to do the above?  Can I change the status of records in
> the
> >> recordset such that the records are recognized as new reocrds when
> updaing
> >> the database?

> >> Thank you very much.

> >> Sheldon Wang



Fri, 19 Nov 2004 22:43:14 GMT  
 How to change ADO recordset retrieved from Oracle into new recordset
Thanks,

I will give it a try.

Sheldon Wang

Quote:

>Hi,

>It depends on providers capabilities and format could slightly very,
>depending on it. Try to do next. Open records, disconnect it from db and
>update one record. Also add new record into recordset and save recordset
>into XML file. Open file using some tools, like IE browser. You should see
>records, which record was updated and which one was inserted.

>--
>Val Mazur
>Microsoft MVP



>> Hi Val,

>> Thank you very much for your help. I know how to save a recordset into an
>> XML stream and retrieve it back to a recordset.  I went through the
>> ADODB.Stream object, But I did not find a method or property to "change
>> records' status from
>> updated to inserted ".  Could you provide further assistance such as a
>> sample code or point me to a place where I can get more information?

>> Thanks again.

>> Sheldon Wang


>> >Hi,

>> >You cannot change status of records on opened recordset. What you could
>do
>> >is to save recordset into XML file/stream and change records' status
from
>> >updated to inserted there, then load XML back into recordset, reconnect
>> >recordset to DB and call UpdateBatch to insert new records into DB

>> >--
>> >Val Mazur
>> >Microsoft MVP



>> >> Hi,

>> >> I retrieved data into an ADO recordset from an Oracle database and
then
>> >made
>> >> changes to the recordset. Instead of updating the database, I want to
>> >change
>> >> the retrieved recordset into a new recordset and then insert the new
>> >> recordset into the same database as completely new rows.

>> >> Is there a way to do the above?  Can I change the status of records in
>> the
>> >> recordset such that the records are recognized as new reocrds when
>> updaing
>> >> the database?

>> >> Thank you very much.

>> >> Sheldon Wang



Sat, 20 Nov 2004 06:34:50 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. retrieve recordsets from Oracle using ADO

2. retrieve recordsets from Oracle using ADO

3. How to retrieve recordsets from Oracle Stored Procs Using ADO

4. retrieve recordsets from Oracle using ADO

5. retrieve recordsets from Oracle using ADO

6. 2 ado recordsets into a new 3rd recordset

7. Open ADO recordset on another ADO recordset - possible?

8. Retrieve Recordsets from Oracle 8i Stored Procs

9. HEP: Dataenvironment Can Retrieve A New RecordSet But Cannot Update Controls

10. HEP: Dataenvironment Can Retrieve A New RecordSet But Cannot Update Controls

11. Select * using Ado not retrieving a record from the recordset

12. ADO populating DataGrid from Recordset(data retrieved from stored procedure using 3 parameters)

 

 
Powered by phpBB® Forum Software