Use data designers in non-visual component

  • Thread starter Thread starter Bomza
  • Start date Start date
B

Bomza

Is there any way of using the ADO data wizards in a non-visual
component? If you create a "web service" project, you drag ADO
components onto a designer and use wizards, but I can't work out how to
do this with a standard class library.

Cheers.
 
I don't know if you can. But look at it as a good thing. Wizards are really
only good as a learning tool and when you are just starting out. I would be
worried about production code that was created via these wizards.

You are better off learning how to use these objects yourself, and
encapsulating common function in libraries.
 
I'm afraid you haven't convinced me Marina :)

Thing is I've got 6 data adapters, and my stored procedures take 4-5
parameters so its a bit of a headache maintaining it all just through
code. Wizards aren't just learning tools, they can also be serious
productivity tools too!
 
Well, that is because you are probably imagining writing all the code that
the wizard generates, yourself.

Where as you should probably be writing function capable of doing it for
you.

For example, it would be relatively easy to write a generic function,
capable of executing any stored procedure. All it would need is the name of
the procedure, and a list of parameters with their corresponding values.

You could then call this method for any number of stored procedures. Once
your method was written, calling it would always be 1 line of code.

I still maintain that wizards have way too many bugs, generate way too much
needless code to be used in a production environment. They give the
appearence that everything works like magic, which means developers don't
end up learning about how things really work.
 
Back
Top