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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:16:54+00:00 2026-05-18T03:16:54+00:00

Currently, I would like provide this as an option to the user when storing

  • 0

Currently, I would like provide this as an option to the user when storing data to the database.

Save the data to a file and use a background thread to read data from the textfile to SQL server.

Flow of my program:
– A stream of data coming from a server constantly (100 per second).
– want to store the data in a textfile and use background thread to copy data from the textfile back to the SQL database constantly as another user option.

Has this been done before?

Cheers.

  • 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-18T03:16:55+00:00Added an answer on May 18, 2026 at 3:16 am

    Your question is indeed a bit confusing.

    I’m guessing you mean that:

    • 100 rows per second come from a certain source or server (eg. log entries)
    • One option for the user is textfile caching: the rows are stored in a textfile and periodically an incremental copy of the contents of the textfile into (an) SQL Server table(s) is performed.
    • Another option for the user is direct insert: the data is stored directly in the database as it comes in, with no textfile in between.

    Am I right?

    If yes, then you should do something in the lines of:

    • Create a trigger on an INSERT action to the table
    • In that trigger, check which user is inserting. If the user has textfile caching disabled, then the insert can go on. Otherwise, the data is redirected to a textfile (or a caching table)
    • Create a stored procedure that checks the caching table or text file for new data, copies the new data into the real table, and deletes the cached data.
    • Create an SQL Server Agent job that runs above stored procedure every minute, hour, day…

    Since the interface from T-SQL to textfiles is not very flexible, I would recommend using a caching table instead. Why a textfile?

    And for that matter, why cache the data before inserting it into the table? Perhaps we can suggest a better solution, if you explain the context of your question.

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

Sidebar

Related Questions

I'm currently building a project and I would like to make use of some
I would like to see the threads currently active in my application while debugging
Our customer would like to know who is online and currently using the custom
I would like to add an operator to a class. I currently have a
I would like to find out, in JavaScript, which element currently has focus. I've
I currently have a controller were I would like to keep track of logging
I currently have a small Java program which I would like to run both
Currently I have a ListView (using the Details View). I would like to implement
I'm working on a project that currently has zero users but we would like
I am currently working on a REST library for .net, and I would like

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.