ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1733
Number of posts: 3304

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Map drive to DB Server Posted by bubberz on 10 Aug 2005 at 1:59 PM
Here's my scenario:
1. Prompt user to load .xls file from their machine
2. On click event of Upload button, save the rows in the .xls file to an existing table on the database server

So, if the existing database table has 10 rows, and the user's .xls file has 10 rows, after the click event of the Upload button, the table will now have 20 rows.

I'm told since the db server is a separate machine, I have to map a drive to the server.

How can I do this w/in my ASP.NET application?

Thanks!
Report
Re: Map drive to DB Server Posted by iwilld0it on 15 Aug 2005 at 6:22 AM
Who ever told you that was a fool.

You do not need to map a drive. You can create an ado.net connection to the excel file (On the web server) and select the rows into a dataset.

Then you create a connection to the database server via ado.net and dump the contents of the dataset into the table.

Here are some articles to help:

EXCEL TO SQL Server
-------------------

http://www.dotnetmonster.com/Uwe/Forum.aspx/asp-net/39245/Load-Excel-to-SQL-Server-using-NET

ADO.NET and EXCEL
-----------------

http://www.vbdotnetheaven.com/Code/Jun2003/2096.asp
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316934






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.