How to automate parameterized queries/stored procedures

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top