470,647 Members | 1,184 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

upload file contents to SQL

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
Oct 4 '06 #1
4 1410
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

igotyourdotnet wrote:
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
Oct 4 '06 #2
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/lib...rols.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 (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

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

Oct 5 '06 #3
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

"Walter Wang [MSFT]" wrote:
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/lib...rols.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 (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

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

Oct 5 '06 #4
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 (wa****@online.microsoft.com, 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.

Oct 6 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by wakun | last post: by
4 posts views Thread by Jim Michaels | last post: by
6 posts views Thread by Vic Spainhower | last post: by
9 posts views Thread by Steve Poe | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.