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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:55:48+00:00 2026-06-15T04:55:48+00:00

I’ve inherited a project that has a very odd quirk I’d like to fix.

  • 0

I’ve inherited a project that has a very odd quirk I’d like to fix. The project has a web form where user’s key in data and then click a “Submit” button. Given that we have a SQL database in our office, I expected that each value would be read from the form and saved in a SQL table.

However, this is not the case. Some values are saved in SQL, but some are not. How are the values looked up that aren’t saved in SQL? Simple Answer: the Javascript in the form is written so that when the user clicks submit, the mark-up of the entire form is sent to the server and saved in a text file. Then, when an authorized user wants to see how the user filled out the form, the mark-up is retrieved from the text file and sent down the wire to the browser.

This is clearly not the best way of doing this because it is wasteful of disk space and is not readily queryable.

That’s why I’m rewriting the code so that future entries in the web form will be saved entirely in SQL.

In the meantime, I have tens of thousands of text files containing HTML fragments that need to be imported into SQL. My idea is to write a utility program to parse the files, one-by-one, and save the field values in SQL.

I wanted to ask for advice about the best way to do this. Normally, I use jQuery to read values from HTML, but I don’t know of a practical way to do this with so many files. I also have Visual Studio 2010 at my disposal.

What tools and techniques would be best to accomplish this task?

  • 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-15T04:55:49+00:00Added an answer on June 15, 2026 at 4:55 am

    If you are on a Windows machine, I’d start by using windows script host to make a list of the files you need to process. If you copy the code below into a js file, save that js file into the directory containing thousands of files, then double-click the js file in Windows (to run it in wscript), it will save an array listing the thousands of files you need to check.

    var io, here, fileToWrite, files;
    
    io   =  new ActiveXObject('Scripting.FileSystemObject');
    here = unescape(io.GetParentFolderName(WScript.ScriptFullName) + "\\");
    
    fileToWrite = io.OpenTextFile(here + "\\filelist.js", 2, true);
    fileToWrite.writeLine("filelist=[");
    
    for (files = new Enumerator(io.GetFolder(here).files); !files.atEnd(); files.moveNext()) {
      var file = files.item();
      fileToWrite.writeLine('"' + file.Name + '",');
    }
    
    fileToWrite.writeLine("]");
    fileToWrite.Close();
    WScript.Echo("Process Complete - an array of files has been created");
    

    You could then create a browser-based jQuery script that would load each file in sequentially, extract the information however you would normally, then save it into a more consumable format such as a text file using the FileSystemObject. (You must use IE for this.)

    If you run into security issues trying to create a FileSystemObject in IE, just rename your html file with the “hta” extension – that will create an html application with the rights to do this.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a small JavaScript validation script that validates inputs based on Regex. I

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.