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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:03:18+00:00 2026-06-06T23:03:18+00:00

I am writing a library which writes something into the database for temporary use

  • 0

I am writing a library which writes something into the database for temporary use (use only once) and then gets removed (its strange, but there is a certain implementation necessary for this ). For this I am trying to execute a thread which writes in the data into the database, waits for the page to finish loading and then releases to finish executing, removing the record. I am not sure how to apprach this. One way is to make the thread sleep but then I am risking either not allowing enough time or the thread might still be running after the page has finished doing everything else. Is there a way to tie this into the page thread so I can release my thread right after it finishes? What are some, if any, approaches to something like this? Because this is a library I would much rather not have another programmer call a function at the end of his page code to remove the record; its messy and easily forgotten.

  • 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-06T23:03:19+00:00Added an answer on June 6, 2026 at 11:03 pm

    Unless you want to use threads for some other reason (i.e. educational) consider using Application events for that – you can listen AcquireRequestState and ReleaseRequestState or similar pair depending on your needs and perform your database operations. Check application lifecicle to see all events and order of them.

    How to: Create ASP.NET Application-Level Event Handlers

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

Sidebar

Related Questions

I'm writing program which captures audio in C# using DirectShow library and writes it
I am writing a library which uses a few functions from the windows user32.dll
I am writing a library which is a set of classes meant to be
Is there a library out there which will validate CSS? The only tools I
I'm writing a ViewModel library which works with my WPF Custom Controls. My problem
I am writing a OS abstraction library for which i want to write wrappers
I'm writing a small data structures library in C#, and I'm running into an
I am writing a library in standard C++ which does the phonetic conversion. I
LuaSQL , which seems to be the canonical library for most SQL database systems
I have been writing a library for my project (for now I am using

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.