Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 32369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:45:08+00:00 2026-05-10T13:45:08+00:00

Assuming you can’t use LINQ for whatever reason, is it a better practice to

  • 0

Assuming you can’t use LINQ for whatever reason, is it a better practice to place your queries in stored procedures, or is it just as good a practice to execute ad hoc queries against the database (say, SQL Server for argument’s sake)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T13:45:08+00:00Added an answer on May 10, 2026 at 1:45 pm

    In my experience writing mostly WinForms Client/Server apps these are the simple conclusions I’ve come to:

    Use Stored Procedures:

    1. For any complex data work. If you’re going to be doing something truly requiring a cursor or temp tables it’s usually fastest to do it within SQL Server.
    2. When you need to lock down access to the data. If you don’t give table access to users (or role or whatever) you can be sure that the only way to interact with the data is through the SP’s you create.

    Use ad-hoc queries:

    1. For CRUD when you don’t need to restrict data access (or are doing so in another manner).
    2. For simple searches. Creating SP’s for a bunch of search criteria is a pain and difficult to maintain. If you can generate a reasonably fast search query use that.

    In most of my applications I’ve used both SP’s and ad-hoc sql, though I find I’m using SP’s less and less as they end up being code just like C#, only harder to version control, test, and maintain. I would recommend using ad-hoc sql unless you can find a specific reason not to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am assuming that as the code is standard C#, I can just use
Assuming that the two are compatible, how can I force Maven 2 to use
Assuming I have an open source web server or proxy I can enhance, let's
Assuming Windows, is there a way I can detect from within a batch file
Assuming I am not running server side scripting of any kind, how can I
How can I determine how much memory each device driver is consuming? I'm assuming
How can I predict the future size / growth of an Oracle table? Assuming:
With common lisp and I am assuming the introspection properties. How can I add
I am assuming nhibernate can handle circular reference issues as I have not seen
I've recently taken over a project from another consulting firm. I'm assuming this can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.