Hi, >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 :
I don't know how to fill the second table. Without batch query support, we can't do like, strSQL = "select customerid from customers; select orderid, customerid from orders"; FbDataAdapter da = new FbDataAdapter (strSQL, strConn); // strConn being connection string da.TableMappings.Add("Table", "Customers"); da.TableMappings.Add(Table1", "Orders"); da.Fill(ds); can we? Am I supposed to do something like this? DataSet ds = new DataSet(); DataTable tbl; tbl = ds.Tables.Add("Customers"); // add colums tbl = ds.Tables.Add("Orders"); // add colums strSQL1 = "select customerid from customers"; strSQL2 = "select orderid, customerid from orders"; FbDataAdapter da = new FbDataAdapter (strSQL1, strConn); da.TableMappings.Add("Table", "Customers"); da.Fill(ds); // create FbCommand cmd from a factory method cmd.Connection = strConn; cmd.CommandText = strSQL2; da.SelectCommand = cmd; // re-assigning SelectCommand da.TableMappings.Add(Table1", "Orders"); da.Fill(ds); I hope I am not. > 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" I know this part. To do this, I need to have two tables filled with date within a single DataSet, boiling down to the above first question. Thanks, 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 Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider