As we know the DataSet is working with disconnected Data. Once we fetch the results of a query into a DataSet using a DataAdatper object. there is no longer a connection between DataSet and Database. If other user modify data in database that corresponds to the data in DataSet , we will not see those charges in our DataSet.
But in a Bussiness windows Application System. it need to responds any changes.
For example, if Sales department Manager queries the data from Databas and fills it into DataSet. Maybe there are 10 records in DataSet, But at the same time the Sales department Sales cancel a customer orders , how colud the Manager know the change ? Because the DataSet is disconnected, he will never know the changes except he close the Application and re-open it.
Is it right?If it is right, it will make a big trouble.
Loading
vince liuPosted Sep 7, 2005, 1:03 AM
Do you mean that if we want to know the detail data in Dataset , we should bind it into Datagrid or DatagridView, right?
It seems not so friendly.
Have you ever create any usercontrol and use it on Window Form?
I have an question about how could i control the usercontrol click event .
Let me explain it .
As we know that ever Win Form usually have some buttons like "frist ","previous","next","last","close"..etc.
And we will create an usercontrol to include those buttons, then we can use it on every Form, right?
I want to requery the data from database when user push the next button on the usercontrol.
And I know , I can use the Form Formobj=Form.FindForm() method to get the WinForm which usercontrol is.
Then , I can use Formobj.close() to close the Form.
But why I can use the Formobj.textBox1.text to assign a string to the textBox1 which is on the winForm?
I can't assign the string to textBox1, even I modify the textBox1 from private to public .
How could I do ?
Andrzej WegierskiPosted Sep 6, 2005, 3:03 AM
vince liuPosted Sep 5, 2005, 10:40 AM
Do you have any sample code?or other suggestion?please,kindly share it .
I have another question about how to Browse data in DataSet.
If you ever use VFP or VB to create Application . That we can very easily to browse the data what we queried from database by the command "Browse" and it will show the template data what we queried.
But it seems very hard to know what we queried from Database ,I need to write it into XML file or bind it in templeate datagrid.
It's really unfrinedly.Is DotNet not a good tools to create an Windows From Application?
Andrzej WegierskiPosted Sep 5, 2005, 5:41 AM
- load DataSet dynamically while You use it, not once when app is starting to limit the trouble. Updates of data will generate an error when something changed
- use own class with semaphores to notice changes to solve problem