By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,640 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,640 IT Pros & Developers. It's quick & easy.

two datasets (Master-detail) problem

P: n/a
I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Agnes,

Relation questions are always difficult to answer because we do not know on
what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations, otherwise
you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks

Nov 20 '05 #2

P: n/a
I should ask my problem in another way. I got serveral textbox, and one
button .As the user input the data and press button, the data should be
displayed in the datagrid.
However, (I check the database, the records is really inserted. but the
datagird got nothing change in run-time)
I did fill(dsInvoice) again , and dgInvoice.tablestyles.clear() , and then
new the tablestyles again.
But it doesn't help ~~~
"Cor Ligthert" <no**********@planet.nl> 在郵件
news:uv**************@tk2msftngp13.phx.gbl 中撰寫...
Agnes,

Relation questions are always difficult to answer because we do not know on what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations, otherwise you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks


Nov 20 '05 #3

P: n/a
I think I am too tired .... and did something wrong about my code . I know
where is my problem
Please ignore the question ~~
"Agnes" <ag***@dynamictech.com.hk> 在郵件
news:O5*************@TK2MSFTNGP12.phx.gbl 中撰寫...
I should ask my problem in another way. I got serveral textbox, and one
button .As the user input the data and press button, the data should be
displayed in the datagrid.
However, (I check the database, the records is really inserted. but the
datagird got nothing change in run-time)
I did fill(dsInvoice) again , and dgInvoice.tablestyles.clear() , and then
new the tablestyles again.
But it doesn't help ~~~
"Cor Ligthert" <no**********@planet.nl> 在郵件
news:uv**************@tk2msftngp13.phx.gbl 中撰寫...
Agnes,

Relation questions are always difficult to answer because we do not know

on
what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations,

otherwise
you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??
Thanks



Nov 20 '05 #4

P: n/a
OK can happen to everybody.

:-)

Cor
I think I am too tired .... and did something wrong about my code . I know
where is my problem
Please ignore the question ~~

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.