upload file contents to SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Currently I have a asp.net 1.1 web page that uploads text file contents into
SQL. it reads the files line by line and then inserts the data. I want to
convert this web into 05. I was wondering if there is anything easier in 05
to upload files contents into SQL 05?

Do I still have to read the file line by line and parse out the line like
(string.SubString(4,10)) to get the value needed or is there an easier way?
I have 35 files that are different formatting and I have load all of them
into SQL via a web page
 
I found your question interesting and I figured that there had to be a
way to get to the sql server dts functionality. I found the following
article:

http://www.sqlteam.com/item.asp?ItemID=19595

What you want to do can best be done by creating a dts package and the
article tells you how to create a job on the fly that will run the dts
package.

Try googling DTS package and asp.net together and see what else you
find.

Good luck
Kathryn
 
Hi,

From your post, I understand that you're planning to upgrade your web site
to .NET 2.0.

# What's New in ASP.NET
http://msdn2.microsoft.com/en-us/library/fa1h9d0d.aspx

Also, you're extracting data from text file and inserting into sqlserver. I
don't think this is ASP.NET-particular. Though the new FileUpload control
may help you in the uploading process:

# FileUpload Class
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.fileuploa
d.aspx

Regarding the file parsing part, I think this remains the same as in 1.1.

I also agree with Kathryn that you may want to check out sqlserver's DTS
function to import data from text files.

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I agree a DTS package would most likely work like we want it to BUT, the "DB"
person, wants all the text file parsing done from the web page
 
Thanks for the update.

If you have questions regarding your code of text file parsing, please feel
free to post here or create a new post in other related dotnet newsgroups.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top