Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2003, 01:25 AM
Authorized User
 
Join Date: Jul 2003
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sankar
Default Saving Excel data to SQL Server via ASP

Hi guys,
I need to save data from excel files to SQL server via ASP. How can I do that? Please note, my excel file will be a client-side file and SQL server and ASP will be server-side. Do I have to upload the excel first and then read from excel to pick data from and transfer to SQL server table? Or what it is...
Any help with some basic codes will be of great help.
Thx in adv.


Sankar Sengupta
__________________
Sankar Sengupta
Striving for the BEST
 
Old December 3rd, 2003, 08:52 PM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you can write a special ASP COM component to do this, and you must get the client's trust.

 
Old December 5th, 2003, 07:38 AM
Authorized User
 
Join Date: Jul 2003
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sankar
Default

Quote:
quote:Originally posted by yangfanatp2p
 Maybe you can write a special ASP COM component to do this, and you must get the client's trust.

I guess that is not possible. I don't have permission to write COM components here.

Sankar Sengupta
 
Old December 5th, 2003, 07:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, you will need to upload the file first, ASP cannot read files off the client's hard disk.

I think your best bet will be to use the Excel ODBC driver to extract the data from the spreadsheet. See http://support.microsoft.com/default.aspx?kbid=195951 for an example.

hth
Phil
 
Old December 5th, 2003, 08:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just had another thought, you should be able to drive the import from SQL Server using the OPENDATASOURCE command to read from the Excel sheet. That would be much quicker than using ASP to read the Excel sheet and construct insert queries for SQL Server. Personally, I would go for that option first.

Some examples here:
http://www.sql-server-performance.co...?TOPIC_ID=2274
http://msdn.microsoft.com/library/de...oa-oz_2be1.asp
 
Old December 5th, 2003, 08:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Also, take a look at this post in the archive where we talked about doing the same thing for a text file using the text driver - its the same principle for an Excel file.
http://p2p.wrox.com/topic.asp?TOPIC_ID=4693

hth
Phil
 
Old February 11th, 2005, 09:22 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vishal chudmunge
Default

Hi guys,
I need to save data from excel files to SQL server via ASP .Net. How can I do that?
Any help with some basic codes will be of great help.
Thx in adv.

vishal chudmunge






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert Data from Excel file to SQL server yes_no ASP.NET 1.0 and 1.1 Professional 5 August 27th, 2008 12:46 AM
how to import excel data into sql server khaink ASP.NET 1.0 and 1.1 Basics 1 July 31st, 2007 09:10 PM
access data of excel sheet into sql server in asp KGANESH2006 SQL Server ASP 2 April 20th, 2006 02:33 AM
how to import data from excel,csv into sql server therisingsun ASP.NET 1.0 and 1.1 Basics 2 October 1st, 2005 12:17 AM
Loading Excel into SQL Server using ASP.NET chiefg ADO.NET 6 July 22nd, 2004 11:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.