Constructing a query at runtime for use in a stored procedure?
What would be the advantage of constructing the procedure
at run via any mechanism which will ultimately convert it back
to a string for compilation?
Stored procedures are meant to be created once and called
many times. If you are dynamically constructing things,
why bother with creating a stored procedure of it first
versus just using dynamic sql?
Perhaps I'm missing something crucial?
--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/..._generator.asp
"Chris" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Does anyone know of a way of contructing a query for use in a stored
procedure programatically without resorting to concatanating lots of
strings together. I was looking a the linq project but was concerned that
it is a bit too new/ in development to start using on commercial systems.
Any ideas would be great.