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
  • 1 View
  • 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 have a -dealloc() method which I am assuming I can use to dealloc
I've recently taken over a project from another consulting firm. I'm assuming this can
how to write a Java class to sort 10 billion integers, assuming we can
I have an IEnumerable, listOfOnes, and an IEnumerable, listOfTwos. Assuming that I can compare
Assuming the webserver is configured to handle .exe , Can i compile a python
Assuming that CompareAndSwap (or CAS) never fails spuriously, can CompareExchange be implemented with CAS?
Assuming that I know there is a git-daemon running at git://git.mycompany.com , how can
Assuming I have a comments model and a posts model, What code can I
Assuming I have an event subscription such as _vm.PropertyChanged += OnViewModelAmountChanged; How can I
Assuming I have a unix timestamp in PHP. How can I round my php

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.