tags:

views:

241

answers:

2

I used to build data layer by using Classes, however someone suggest to use Strongly Typed DataSets because it's faster in development. The data layer that I'm going to build should support multi DBMS(Oracle,MSSQL, MySQL..).

how is better build it by using Strongly Typed DataSets or by using Classes?

A: 

I made several big business applications using Strongly Typed DataSets. (Both for Oracle and MSSQL)

I like to work with Strongly Typed Datasets, and I will do it again next time. I think it is a BIG help that the columns are strongly typed in the C# and VB.NET code. But be aware that you will probably have to make your own functions for fill and sometimes for Update too. (based on where clause) For Oracle I used System.Data.OracleClient (I found this one was best for me)

Please note that for Oracle all numbers are converted to Decimal. (not smart for ID columns) And when you change SQL string in the TableAdapter it will overwrite your changes from Decimal to Int32. This can be very annoying, but when you get used to it, it is not a big problem.

thomas nn
Strongly typed datasets are nice, but the generated TableAdapters are awful... There is no easy way to change the connection string except change the app.config, so it can't be done by the program itself. And they are always generated for a specific DBMS, not using generic code :(
Thomas Levesque
A: 

I put it in a database table so when the business content changes (tables or fields) you don't have to re-compile the code.

It's a fundamentally different approach, however. It uses dynamic SQL internally (not based on any user input,) which makes some people nervous.

Beth