This is a continuation of MrNorth posts in http://www.vbforums.com/showthread.p...hreadid=296488 discussing persistence and whether to use Custom classes or typed classes.
Printable View
This is a continuation of MrNorth posts in http://www.vbforums.com/showthread.p...hreadid=296488 discussing persistence and whether to use Custom classes or typed classes.
Firstly, the datasets can only handle simple table mappings. Like I said in previous posts, you would only use the datasets where you have simple relationships. Complex relationships will always require additional coding. For that, use custom classes. You could possibly generate your updates based on the table relationships and required columns etc. But that will probably be a bit of a brain tease. Rather just type them out yourself.
In terms of the SQL, I always load them from a repository! Hardcoded SQL, for me, is an absolute NO! As for concatenated SQL; even worse! ALWAYS use parameters.
I also find it interesting that you have 50 methods in your DAL. What do they actually do? I think your update problems lie here... Maybe not... Make me understand what you are doing in your DAL (please)... I find this a particularly interesting subject and want to understand how other people are doing it and the problems involved with each approach!
Thanks,
shunt!