Hello everyone,
Anyone out there have a DAL Generator Utility for sale for free that mimics
what happens in the IDE designer when you drag a dataadapter onto a
component?
I like what MS did here, I just don't like the instantiation of all the
objects on New().
They Do:
Sub Initialize()
da1 = new dataadapter
da2 = new dataadapter
sqlconn = new connection(someconnectionstring)
selectcommand1 = new command
....
I want to do
readonly property da1 as dataadapter
get
if m_da1 is nothing then
m_da1 = new dataadapter
m_da1.connection = GetConnection
'Add transaction support
if m_intransaction then
dim cb as commandbuilder
....
'Add event handlers
addhandler m_da1.....
I have 40 tables, that is a lot of copy and paste, and too many chances to
get it wrong and wind up chasing redherrings. Plus if I make and schema
changes, I would have to manually correct the changes in my DAL.
I have been playing with creating my own generator, and realized that they
is way too much I don't know and understand about what goes on to make a
generic tool nor do I have the time to get the tool to a point where I can
use it for my application. I spent 4 days manually setting up my DAL more
consistent with a format that I wanted. Now the business has come back with
some additional changes and I must begin this arduous process again.
Thanks in advance