CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2011
    Location
    .Net 4.0
    Posts
    39

    SQL Stored Procedures?

    What's the big deal? Why use them as opposed to coding the procedures in your app?

  2. #2
    Join Date
    Dec 2008
    Posts
    144

    Re: SQL Stored Procedures?

    Depending on what you're doing, they can be faster and lighter on resources. They're most useful if you combine multiple tables into a single data pull- makes it so you only have to make a single call to your database. If you do everything in your app, say through LINQ to SQL, you're actually pulling all of the data over and then sorting it on your application's side instead of letting the server handle it.
    Code:
    if (Issue.Resolved)
    {
         ThreadTools.Click();
         MarkThreadResolved();
    }

  3. #3
    Join Date
    Dec 2011
    Location
    .Net 4.0
    Posts
    39

    Re: SQL Stored Procedures?

    Okay, in that case, it seems only useful for conserving resources (speed). However, if you have a small database (not like CitiGroup, or something), it doesn't seem then that stored procs are helpful in a material way.

    I thought there was a possibility that they helped in some other way, but if not, I will not plan to use them.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: SQL Stored Procedures?

    It depends on the architecture. If you are using a local database, it probably doesn't much matter.

    If you are working on the enterprise level, you might want the interface layer between the client (app or service) and the database that stored procedures provide.

    If you perform all the crud operations behind sprocs, then you may have the flexibility of changing the schema without having to recompile the client code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured