473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Uploaded input text files...need options

I need to create an aspx page that accepts an uploaded text file from a
user and parses the file contents into various, normalized database
tables/columns. The input file is an industry standard, fixed-width
file layout. The file is 'old-school' with the first three columns
representing a segment code that identifies what fields and positions
exist on the line, so it's not just a straight-forward fixed width text
file. I have toyed with a couple of ideas, but I'm a little concerned
about scalability.

I could accept the uploaded file, save as a text file on the server and
parse through it. This seems like it would very expense in terms of
scalability.

I could read the uploaded file directly into an array and parse through
it.

I could store the file directly into the sql database and then call a
stored proc to do the parsing.

If anyone has any other methods to consider or information regarding
the performance impact of any of the above methods, I would greatly
appreciate the feedback.

Oct 19 '06 #1
2 1251
it depends on the size of the file. if under < 4mb, then any method will
work. if greater, then you need a new serverside upload control. the asp.net
version read the complete file into memory tying up iis threads, and asp.net
threads, and hurting scaliability.

normally you can get about 20-30 simutinous uploads (but with configuration
you can hit about 250)
you want an module that caches the upload to a file (otherwise you'll force
recycles).

-- bruce (sqlwork.com)
"Greg" <ge******@aol.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
>I need to create an aspx page that accepts an uploaded text file from a
user and parses the file contents into various, normalized database
tables/columns. The input file is an industry standard, fixed-width
file layout. The file is 'old-school' with the first three columns
representing a segment code that identifies what fields and positions
exist on the line, so it's not just a straight-forward fixed width text
file. I have toyed with a couple of ideas, but I'm a little concerned
about scalability.

I could accept the uploaded file, save as a text file on the server and
parse through it. This seems like it would very expense in terms of
scalability.

I could read the uploaded file directly into an array and parse through
it.

I could store the file directly into the sql database and then call a
stored proc to do the parsing.

If anyone has any other methods to consider or information regarding
the performance impact of any of the above methods, I would greatly
appreciate the feedback.

Oct 19 '06 #2
Thanks for the reply. The files will be small, under 50k for the most
part, so it sounds like whatever is easiest to build/maintain will
work.

bruce barker (sqlwork.com) wrote:
it depends on the size of the file. if under < 4mb, then any method will
work. if greater, then you need a new serverside upload control. the asp.net
version read the complete file into memory tying up iis threads, and asp.net
threads, and hurting scaliability.

normally you can get about 20-30 simutinous uploads (but with configuration
you can hit about 250)
you want an module that caches the upload to a file (otherwise you'll force
recycles).

-- bruce (sqlwork.com)
"Greg" <ge******@aol.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
I need to create an aspx page that accepts an uploaded text file from a
user and parses the file contents into various, normalized database
tables/columns. The input file is an industry standard, fixed-width
file layout. The file is 'old-school' with the first three columns
representing a segment code that identifies what fields and positions
exist on the line, so it's not just a straight-forward fixed width text
file. I have toyed with a couple of ideas, but I'm a little concerned
about scalability.

I could accept the uploaded file, save as a text file on the server and
parse through it. This seems like it would very expense in terms of
scalability.

I could read the uploaded file directly into an array and parse through
it.

I could store the file directly into the sql database and then call a
stored proc to do the parsing.

If anyone has any other methods to consider or information regarding
the performance impact of any of the above methods, I would greatly
appreciate the feedback.
Oct 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brian Lowe | last post by:
My web site accepts uploaded photos and stores them in a SQL table as BLObs so they never touch the filesystem. I have a way to create a thumbnail version of the uploaded image and store that in...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
4
by: riteshjain82 | last post by:
Hi, Please go through this: I am having a file (default.asp) on which i am taking many details from a user before mailing it to someone. I have also provided the user with a facility of...
6
by: Kimmo Laine | last post by:
Running IIS 6 on Windows 2003 server. After an update to the most recent version of php 5.1.2, for some reacon a function handling uploaded files using is_file stopped working. is_file failed...
3
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
8
by: ctiggerf | last post by:
I was hopeing someone could help me out here. Been stumped on this one all day. This function 1. Checks uploaded files. 2. Creates two resized images from each (a full size, and a...
9
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.