views:

53

answers:

2

Sometimes I need to develop a simple database application using MS Access Databases.

I`ve learned that I can manipulate data in my tables using direct SQL Commands or gather everything in a DataSet and update any changes that it tracks (insert, delete...).

But the question is: should my app make changes is my database tables using direct SQL commands or should I only use a DataSet, and why?

Thanks

+1  A: 

People choose tools like DataSet to save upfront development time to avoid reinveting the wheel. If your project is small with one user it might work for you.

That said, I'd take a look at ORM tools like NHibernate as a way to provide similar CRUD functionality as DataSet, but also giving you the ability to work with real Objects and not Rows and Cells.

Zamboni
+1  A: 

Hi,

The DataSets underneath use these commands anyway and you can edit/control them yourself (or leave it for the DataSet to build from your schema), but the DataSet also gives you other fast benefits such as designer support / change tracking / binding / filtering / sorting / etc

There is no "should" when working with a database, different tools will give you benefits and tradeoffs. For very small applications, either use the DataSet or do it manually. As soon as you step up from small, ditch the DataSet and look for other tools as DataSets will start to bite you with deficiencies that are annoying to code around.

Adam