Hierarchical ADO recordset -> ADO.NET Dataset Fill 
Author Message
 Hierarchical ADO recordset -> ADO.NET Dataset Fill

Hi,
I have a dll (VB6 - referenced as com in .NET) that
returns a type like this

Type Tprs {
Person as adodb.recordset

Quote:
}

This recordset is hierarchical (used MSDATAShape).

Now to access this data im my VB.NET program I tried to
use the next :

Dim MYDa as new oledb.oledbdataadapter()
dim MyDs as new Data.dataset()
dim prsRs as adodb.recordset

PrsRs = tprs.person
MyDa.Fill(MyDs,PrsRs,"Mytable")

But on last statement there is always a runtime error :

An unhandled exception of type
'System.reflection.TargetInvocationException' occured in
system.data.dll
Add. information : Exception has been throuwn by the
target of an invocation.

I don't know why, somebody knows why?
Thanks in advance,
Nick



Sun, 10 Jul 2005 05:30:35 GMT  
 Hierarchical ADO recordset -> ADO.NET Dataset Fill
Why not use DataRelation?


Quote:
> Hi,
> I have a dll (VB6 - referenced as com in .NET) that
> returns a type like this

> Type Tprs {
> Person as adodb.recordset
> }
> This recordset is hierarchical (used MSDATAShape).

> Now to access this data im my VB.NET program I tried to
> use the next :

> Dim MYDa as new oledb.oledbdataadapter()
> dim MyDs as new Data.dataset()
> dim prsRs as adodb.recordset

> PrsRs = tprs.person
> MyDa.Fill(MyDs,PrsRs,"Mytable")

> But on last statement there is always a runtime error :

> An unhandled exception of type
> 'System.reflection.TargetInvocationException' occured in
> system.data.dll
> Add. information : Exception has been throuwn by the
> target of an invocation.

> I don't know why, somebody knows why?
> Thanks in advance,
> Nick



Sun, 10 Jul 2005 15:53:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO SHAPE/HIERARCHICAL RECORDSETS

2. ADO and hierarchical recordsets...

3. ADO Hierarchical Recordsets

4. ADO Hierarchical Recordset problem

5. ADO hierarchical recordsets: tantalizing but slow

6. Hierarchical ADO Recordsets

7. ADO hierarchical Recordsets

8. Programatically build of a ADO Hierarchical Recordset

9. ADO SHAPE Command/hierarchical Recordset

10. VB6 ADO and Access 97 - Hierarchical Recordsets

11. Disconnected Hierarchical Recordsets in ADO

12. ADO hierarchical recordsets: tantalizing but slow

 

 
Powered by phpBB® Forum Software