A disconnected recordset against Oracle Recordset -> Errors Occured

A disconnected recordset against Oracle Recordset -> Errors Occured

Post by Uri Tidha » Thu, 16 Mar 2000 04:00:00



Hello,

I'm trying to create a disconnected recordset which is an exact copy of
an existing recordset from Oracle 8.0.4.

Everything's works fine until I'm trying to insert a value to a NUMERIC
field (Ado type 131), with attributes = 120 (The problem occures even
when I remove the attributes, and even when I try to set the field to a
very "innocent" number, such as (rs(0).value = 1).

Any help would be appreciated.
Here's the code:

oRS is the Oracle Recordset.  Rs is the disconnected recordset.

Set rs = New ADODB.Recordset
set oRS = New ADODB.Recordset

oRS.CursorLocation = adUseClient
oRS.Open OraSource, OraConnection, adOpenForwardOnly, adLockReadOnly

For Each f In oRS.Fields
        rs.Fields.Append f.Name, f.Type, f.DefinedSize, f.Attributes
Next

rs.Open

Do While Not oRS.EOF
        rs.AddNew
        For Each f In oRS.Fields
            ' Here's where the error occurs, once f is a numeric (131)
field.
            ' The error returned is "Errors Occured"
            rs(f.Name).Value = f.Value
        Next
        rs.Update
        oRS.MoveNext
Loop

 
 
 

A disconnected recordset against Oracle Recordset -> Errors Occured

Post by Scott Daffor » Thu, 16 Mar 2000 04:00:00




> Hello,

> I'm trying to create a disconnected recordset which is an exact copy
of
> an existing recordset from Oracle 8.0.4.

> Everything's works fine until I'm trying to insert a value to a
NUMERIC
> field (Ado type 131), with attributes = 120 (The problem occures even
> when I remove the attributes, and even when I try to set the field to
a
> very "innocent" number, such as (rs(0).value = 1).

> Any help would be appreciated.
> Here's the code:

> oRS is the Oracle Recordset. Rs is the disconnected recordset.

> Set rs = New ADODB.Recordset
> set oRS = New ADODB.Recordset

> oRS.CursorLocation = adUseClient
> oRS.Open OraSource, OraConnection, adOpenForwardOnly, adLockReadOnly

> For Each f In oRS.Fields
> rs.Fields.Append f.Name, f.Type, f.DefinedSize, f.Attributes
> Next

> rs.Open

> Do While Not oRS.EOF
> rs.AddNew
> For Each f In oRS.Fields
> ' Here's where the error occurs, once f is a numeric (131)
> field.
> ' The error returned is "Errors Occured"
> rs(f.Name).Value = f.Value
> Next
> rs.Update
> oRS.MoveNext
> Loop

I've had similar experiences with the "Errors occurred" error with
respect to Oracle.  The answer may be in the SQL used to open your rs
recordset.  Make sure that the primary key in that table is in your
Select statement if it isn't already.
--
Opinions are mine and do not reflect those of my employer.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. A disconnected recordset against Oracle Recordset -> Errors Occured

Hello,

I'm trying to create a disconnected recordset which is an exact copy of
an existing recordset from Oracle 8.0.4.

Everything's works fine until I'm trying to insert a value to a NUMERIC
field (Ado type 131), with attributes = 120 (The problem occures even
when I remove the attributes, and even when I try to set the field to a
very "innocent" number, such as (rs(0).value = 1).

Any help would be appreciated.
Here's the code:

oRS is the Oracle Recordset.  Rs is the disconnected recordset.

Set rs = New ADODB.Recordset
set oRS = New ADODB.Recordset

oRS.CursorLocation = adUseClient
oRS.Open OraSource, OraConnection, adOpenForwardOnly, adLockReadOnly

For Each f In oRS.Fields
        rs.Fields.Append f.Name, f.Type, f.DefinedSize, f.Attributes
Next

rs.Open

Do While Not oRS.EOF
        rs.AddNew
        For Each f In oRS.Fields
            ' Here's where the error occurs, once f is a numeric (131)
field.
            ' The error returned is "Errors Occured"
            rs(f.Name).Value = f.Value
        Next
        rs.Update
        oRS.MoveNext
Loop

2. Full tablescans on long tables

3. Query against disconnected recordset

4. Delphi vs VB

5. ADO fails to release Recordset cursor after opening disconnected Recordset

6. US-NJ: Voorhees-ORACLE Data Base Administrator

7. Connected Recordset adPersistXML differs from Disconnected Recordset built in-memory

8. Info-Prime Mailing List

9. ADO fails to release Recordset cursor after opening disconnected Recordset

10. Disconnected recordset returned from MTS => Access violation

11. Error 3669 opening a DAO recordset against Informix

12. SQL against attached TXT style recordset (Error 3078)

13. Remote Recordset --> Recordset.UpdateBach doesnt work