DataSets vs Other object--HELP!

tknous

New member
Joined
Jun 11, 2003
Messages
3
Im not sure this is the place to ask this...but Ill give it a try.

I am currently working on a windows application in .NET that will connect to a SQL Server DB. I have been researching ADO.NET for a while and am trying to figure out the best architecture solution for the application. This is an application that will reside on a server, but will also have several workstations some of which will be disconnected at times and will be utilizing replication functionality. I am looking for some advice on whether or not to use DataSets to populate and bind controls and then update the database with these. Or if I should bring the data into another custom object and throw away the DataSet after the ArrayList or other object (probably custom) is populated to bind to.

Also would like to provide that there are some combo boxes that will need to be populated with read-only data, but then the selected value will need to be placed into another table. For example, if we have a customer and we would like to know their race, then the race combo box will be populated with a race table, but the selected race also needs to go into another table with the customer specific information.

Sorry for the confusion if there is any. I am new to .NET and am knee-deep in the learning curve.

Please advise.

Thanks much!
 
Using DataSets to hold data is a perfect fit. Whether you use binding or not is another question, but Id use it where appropriate (hows that for a generic answer?). For instance, even if you dont want to bind your ComboBox to the table, you can still using binding to populate the dropdown.

Now if youre using replication on a client machine, pulling down large chunks of data to a DataSet isnt much of a concern. But if the user must pull a large chunk across the network (large being relative - youll have to run tests yourself), it could possibly affect performance of the app, network, etc.

Keep in mind that if you create a DataSet from an XSD file, Microsoft has provided a tool that will automatically generate a class that looks like the table (including creating properties for each field in the table, etc.).

-Ner
 
Thank you for your help with the DataSets. I do understand what you are explaining with the binding issue.

We will be using replication as the application will be used by field agents on laptops. Could I however, pull down a dataset the first time the application runs into a xsd file or even transfer it to the laptop containing all of the static or "population" data? Then load it from there each time the application starts. For updates, I could check the network when the computer is actually connected to notify the user. Is this feasible?

All other data will mostly be input when in the field. Also what is the tool to automatically generate your class? I am interested in trying that with the client information.

Thank you again. Help is greatly appreciated!
 
Back
Top