If I understood, you try to create a relation between some datatables,so fill 
the same dataset with table1 and table 2 (call fill for both) and then 
something like this : 

                Dim wRel As New DataRelation("Relat_dp", _
                 ds.Tables(0).Columns("id"), ds.Tables(1).Columns("id_fk"))
                 ds.Relations.Add(wRel)
bind your child controls to "Relat_dp"


----- Original Message ----
From: Nobuya Higuchi <[EMAIL PROTECTED]>
To: For users and developers of the Firebird .NET providers 
<[email protected]>
Sent: Wednesday, September 12, 2007 1:28:08 PM
Subject: Re: [Firebird-net-provider] how to use relation

Hi Carlos,

>Couldn't you use TableAdapters ( and fill them with data ) or fill the
>dataset table using the TableAdapter ??

Yes, I use DataAdapter to fill a DataSet (I do not use TableAdapter as a policy 
to avoid design-time GUI dependancy). But because I have to create a DbCommand 
(FbCommand) using only a single SQL statement (since batch query is not 
supported), the Fill method of the DataAdapter populates only a single 
DataTable in the DataSet with data. On the other hand, as I understand, we need 
to add a Relation to the DataSet to obtain parent-child relation between two 
tables. So my question is, how can I populate the second table in the same 
DataSet? Or can I set tables from different DataSets into a Relation, and 
adding it to one of the DataSets' Relation will work to get parent-child 
relationship? Maybe I'm missing something very basic but please enlighten me. I 
want to establish parent-child relationship in the detached data objects level, 
not in the original database level.

Regards,
Nobuya




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider







       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the 
tools to get online.
http://smallbusiness.yahoo.com/webhosting 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to