G
gjetthvemjeger
Hi,
I am working with WB.NET and SQL Server.
I have some trouble grasping what a DataSet in VB.NET is. Do the
DataSet mirror the whole database used as the data store for one
application or is it recommended to use multiple Dataset for this
database (one application).
Example:
My DataSet have 3 tables: Table1, Table2 and Table3.
Table2 has 2 columns, CustomerID and OrderID
Table1 has 1 column CustomerID
Table3 has 1 column OrderID.
For GridList1 I need to define the CustomerID as the PrimaryKey in
Table2 and link it to Table1's CustomerID
For GridList2 I need to define the OrderID as The PrimaryKey in Table2
and link it to Table3's OrderID.
Then I have one Table (Table2) with two different PrimaryKeys depending
on witch Grid I want to display my data in.
Do this work or do I have to make two different DataSets, one for
Table1 and Table 2 and one for Table2 and Table3?
My tables have quite a lot of data. When I fill my Datasets with data
from the database, can I choose witch table in the DataSet I want to
fill or do I have to fill the whole DataSet at once?
Is it best practice to keep the amount of DataSets small but with many
tables or it is best practice to have many DataSets but a small amount
of tables in each one of them?
Thanks in advance )
I am working with WB.NET and SQL Server.
I have some trouble grasping what a DataSet in VB.NET is. Do the
DataSet mirror the whole database used as the data store for one
application or is it recommended to use multiple Dataset for this
database (one application).
Example:
My DataSet have 3 tables: Table1, Table2 and Table3.
Table2 has 2 columns, CustomerID and OrderID
Table1 has 1 column CustomerID
Table3 has 1 column OrderID.
For GridList1 I need to define the CustomerID as the PrimaryKey in
Table2 and link it to Table1's CustomerID
For GridList2 I need to define the OrderID as The PrimaryKey in Table2
and link it to Table3's OrderID.
Then I have one Table (Table2) with two different PrimaryKeys depending
on witch Grid I want to display my data in.
Do this work or do I have to make two different DataSets, one for
Table1 and Table 2 and one for Table2 and Table3?
My tables have quite a lot of data. When I fill my Datasets with data
from the database, can I choose witch table in the DataSet I want to
fill or do I have to fill the whole DataSet at once?
Is it best practice to keep the amount of DataSets small but with many
tables or it is best practice to have many DataSets but a small amount
of tables in each one of them?
Thanks in advance )