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 961931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:25:34+00:00 2026-05-16T01:25:34+00:00

Let me explain this question a bit :) I’m writing a bunch of stored

  • 0

Let me explain this question a bit 🙂

I’m writing a bunch of stored procedures for a new product.
They will only ever be called by the c# application, written by the developers who are following the same tech spec I’ve been given.
I cant go into the real tech spec, so I’ll give an close enough example:

In the tech spec, we’re having to store file data in a couple of proprietary zip files, with a database storing the names and locations of each file within a zip (eg, one database for each zip file)

Now, lets say that this tech spec states that, to perform “Operation A”, the following steps must be done:

1: Calculate the space requirements of the file to be added

2: Get a list of zip files and their database connection strings (call stored proc “GetZips”)

2: Find a suitable location within the zip file to store the file (call stored proc “GetSuitableFileLocation” against each database connection, until a suitable one is found)

3: In step 2, you will be provided with a start/end point within the zip to add your file.
Call the “AllocateLocationToFile” stored proc, passing in these values, then add your file to the zip.

OK – so the question is, should “AllocateLocationToFile” re-check the specified start/end points are still “free”, and if not, raise an exception?

There was a bit of a discussion about this in the office, and whilst I believe it should check and raise, others believe that it should not, as there is no need due to the developer calling “GetSuitableFileLocation” immediately beforehand.

Can I ask for some valued oppinions?

  • 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. Editorial Team
    Editorial Team
    2026-05-16T01:25:35+00:00Added an answer on May 16, 2026 at 1:25 am

    Generally, it is better to be as safe as possible. A calling code should never rely on an external code (the sps are kind of external). The idea is that you can not predict what would happen in the future. New guys come to the company… the sps are given to another team and so on…

    Personally, the fact that B() is right after A() doesn’t guarantee anything. To change this for whatever reason is not something to be considered impossible.

    A team should never take decisions based on “we are going to maintain this, no problem at all” because they might get fired, the company may sell the product and so on..

    My suggestion is to do the checking, profile the code and if it is really a bottleneck to remove it, but write somewhere that THIS CAN BREAK!.

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

Sidebar

Related Questions

Before you all get pissy about me posting this question again, let me explain
This seems a 'stupid' question, but let me explain. I'm working for a company
This question came to my mind quite a few times. Let my explain my
Ok I know the title doesn't fully explain this question. So I'm writing a
I know the title is bit confusing for my question. Let me explain:- There
I know the title is bit confusing for my question. Let me explain:- There
So this is a bit complicated situation, so I will try to explain what
The question title is a bit obscure so let me explain. A requirement that
I have this question. But it will be difficult for me to explain as
So let me explain my problem a little better now (please reopen this question).

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.