How to automate parameterized queries/stored procedures

  • Thread starter Thread starter mac
  • Start date Start date
M

mac

I have program that modifies data from several different databases, and
includes many many tables and columns. I have created stored procedures for
all the updates, but how do I automate the parameters so that I don't have
to write out 150 column names and their datatypes by hand? Right now all
the values are in arrays or dataset, or other collective list, so I can
easily create the stored procedure syntax with just the values, but to
parameterize it and set the datatypes, that's a whole other story. Any
ideas would be helpful.
 
I have program that modifies data from several different databases,
and includes many many tables and columns. I have created stored
procedures for all the updates, but how do I automate the parameters
so that I don't have to write out 150 column names and their datatypes
by hand? Right now all the values are in arrays or dataset, or other
collective list, so I can easily create the stored procedure syntax
with just the values, but to parameterize it and set the datatypes,
that's a whole other story. Any ideas would be helpful.

You can try a template generator like CodeSmith. CodeSmith allows you to
build custom code templates.

Or for data layer spepcific stuff, an O/R mapper like LLBL Gen.
 
Back
Top