Dynamic Queries

C

Chris

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

Robbe Morris [C# MVP]

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/adonet_source_code_generator.asp
 

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

Forum statistics

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

Latest Threads

Top