Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm not sure this is the place to ask this...but I'll 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!

  • *Experts*
Posted

Using DataSets to hold data is a perfect fit. Whether you use binding or not is another question, but I'd use it where appropriate (how's that for a generic answer?). For instance, even if you don't want to bind your ComboBox to the table, you can still using binding to populate the dropdown.

 

Now if you're using replication on a client machine, pulling down large chunks of data to a DataSet isn't much of a concern. But if the user must pull a large chunk across the network (large being relative - you'll 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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...