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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:19:00+00:00 2026-06-07T16:19:00+00:00

A person opens pages on a website to perform quality control tasks. On one

  • 0

A person opens pages on a website to perform quality control tasks.
On one page, the activity of quality control starts when the person hits a start button.
On another page, the activity starts when the page loads.

The activity of quality control can end once the person:

  1. completes the task,
  2. saves as incomplete, or
  3. just closes the browser window.

The EndTime can occur anywhere from 10 seconds to 30 minutes after the
start of the quality control task.

The Issue:
if you have a table with an ActivityID, a StartTime, and EndTime columns,
what would be the best way of going about saving this information
to the table, when the act of updating the existing record takes place outside of the stored proc that inserted the record? The StartTime has to be captured, which is straightforward enough, but then, however long after the task is completed, the End Time for the unique Activity has to be captured, and Activity EndTime has to be changed from NULL to the time of the “completion”.

Some scenarios to consider:

  • person A begins an Activity, then completes it. 10 seconds later,
    person B starts and finishes.

  • person A begins an Activity, and then person B starts 10 seconds
    later, and person A finishes 5 seconds ahead of person B. (I don
    believe any kind of scope function would work here…
    http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/ ?)

Would this route be acceptable…? Write a proc to call the Insert when the page loads.
As part of the proc, insert the new activity and start time, and also
return the value of the ActivityID (one method described here:
Get the ID of last inserted records).
When the webpage hits an “end” event, then pass the ActivityID returned from
the first proc, and call a proc that adds the End Time for the AcitivityID
that came from the first proc.

  • 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-06-07T16:19:02+00:00Added an answer on June 7, 2026 at 4:19 pm
      insert into [Table_2] ([valueStart]) values('start');
      select SCOPE_IDENTITY();
    
      int sqlIden = SQLcommand.execute();
    
      // perform task
    
      update [Table_2] set [valueFinish] = 'finish' where [id] = sqlIden.ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to search person by auto increment ID (textbox and one button) .
When the person opens my app, I want to display a button. The user
I have a page that displays restaurant food menu. And when a person clicks
I have one page (Products) that searches for products which are then displayed in
So, I have a button where if the person's username and password is correct,
i m trying to implement this thing , that when ever a person opens
function Person() {} Person.prototype.population = 0; Person.prototype.constructor = function(name) { this.name = name; console.log(Name:
class Person { string name; public Person(string name) { this.name = name; } public
I've created a Person class and my code is correct, but I just wanted
Like a person asked here (but his solutions as to call a nother function)

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.