PC Review


Reply
Thread Tools Rate Thread

Best practice to transfer data from Excel file to SQL Server 2000

 
 
GD
Guest
Posts: n/a
 
      31st Jan 2005
Hi,

I am trying write a web application using ASP.Net to load an Excel file from
client site and save all the data in the file to a table in SQL Server 2000.

My current assumption is: load Excel data to an ADO.Net dataset, or a
datareader, then pull the data out from them and insert the data to a SQL
Sever table.

I wonder if there is any better way to transfer the Excel data to SQL
Server.

Thanks for any hints.

GD


 
Reply With Quote
 
 
 
 
WJ
Guest
Posts: n/a
 
      31st Jan 2005
You would want to use the "Import/Export Utility" shipped with the SQL
Server CD. This is the best tool I see so far. I use this daily! On top of
this, the tool also aloows you to schedule the job to run anytime you wish.

John

"GD" <(E-Mail Removed)> wrote in message
news:%23xIxgx%(E-Mail Removed)...
> Hi,
>
> I am trying write a web application using ASP.Net to load an Excel file
> from
> client site and save all the data in the file to a table in SQL Server
> 2000.
>
> My current assumption is: load Excel data to an ADO.Net dataset, or a
> datareader, then pull the data out from them and insert the data to a SQL
> Sever table.
>
> I wonder if there is any better way to transfer the Excel data to SQL
> Server.
>
> Thanks for any hints.
>
> GD
>
>



 
Reply With Quote
 
=?Utf-8?B?RXh0cmVtZSBEYXRhc2V0cw==?=
Guest
Posts: n/a
 
      1st Feb 2005
Do you need the information from the Excel document in SQL or just the
document itself?

If you need to just save the doc use the file upload and instead of saving
the file to disk put into a binary stream and save to sql.

If you need to extract the info to insert into SQL Server, same as above
except you can transform and read anyway you like, Excel object lib, dataset,
SQL DTS

If you want an example let me know, for either.

"GD" wrote:

> Hi,
>
> I am trying write a web application using ASP.Net to load an Excel file from
> client site and save all the data in the file to a table in SQL Server 2000.
>
> My current assumption is: load Excel data to an ADO.Net dataset, or a
> datareader, then pull the data out from them and insert the data to a SQL
> Sever table.
>
> I wonder if there is any better way to transfer the Excel data to SQL
> Server.
>
> Thanks for any hints.
>
> GD
>
>
>

 
Reply With Quote
 
W.G. Ryan eMVP
Guest
Posts: n/a
 
      1st Feb 2005
I agree with WJ - Datasets aren't the best data transfer mechanism - you can
use the ImportExport or write a DTS package - very easy to do and very fast

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"GD" <(E-Mail Removed)> wrote in message
news:#xIxgx#(E-Mail Removed)...
> Hi,
>
> I am trying write a web application using ASP.Net to load an Excel file

from
> client site and save all the data in the file to a table in SQL Server

2000.
>
> My current assumption is: load Excel data to an ADO.Net dataset, or a
> datareader, then pull the data out from them and insert the data to a SQL
> Sever table.
>
> I wonder if there is any better way to transfer the Excel data to SQL
> Server.
>
> Thanks for any hints.
>
> GD
>
>



 
Reply With Quote
 
GD
Guest
Posts: n/a
 
      1st Feb 2005
What I am working on is a web-based client-side application. The clients
don't have the permission to use the Import/Export Utility in SQL Server
directely. However, they are granted permision to perform database
transaction through web application.

Thanks for reply anyway.

GD

"WJ" <(E-Mail Removed)> wrote in message
news:ecy26C$(E-Mail Removed)...
> You would want to use the "Import/Export Utility" shipped with the SQL
> Server CD. This is the best tool I see so far. I use this daily! On top of
> this, the tool also aloows you to schedule the job to run anytime you

wish.
>
> John
>
> "GD" <(E-Mail Removed)> wrote in message
> news:%23xIxgx%(E-Mail Removed)...
> > Hi,
> >
> > I am trying write a web application using ASP.Net to load an Excel file
> > from
> > client site and save all the data in the file to a table in SQL Server
> > 2000.
> >
> > My current assumption is: load Excel data to an ADO.Net dataset, or a
> > datareader, then pull the data out from them and insert the data to a

SQL
> > Sever table.
> >
> > I wonder if there is any better way to transfer the Excel data to SQL
> > Server.
> >
> > Thanks for any hints.
> >
> > GD
> >
> >

>
>



 
Reply With Quote
 
GD
Guest
Posts: n/a
 
      1st Feb 2005
I need to simply load all data from an Excel file chosen by end users, and
then insert the data to a SQL Server table that has exact same data columns
defined as the Excel file. I don't need to use the document itself. This has
to be done in a web-based application. I would appreciate it very much if
you can provide me with sample codes.

Thanks in advance.

GD

"Extreme Datasets" <(E-Mail Removed)> wrote in
message news:1AFCEA18-550B-4E80-A9CA-(E-Mail Removed)...
> Do you need the information from the Excel document in SQL or just the
> document itself?
>
> If you need to just save the doc use the file upload and instead of saving
> the file to disk put into a binary stream and save to sql.
>
> If you need to extract the info to insert into SQL Server, same as above
> except you can transform and read anyway you like, Excel object lib,

dataset,
> SQL DTS
>
> If you want an example let me know, for either.
>
> "GD" wrote:
>
> > Hi,
> >
> > I am trying write a web application using ASP.Net to load an Excel file

from
> > client site and save all the data in the file to a table in SQL Server

2000.
> >
> > My current assumption is: load Excel data to an ADO.Net dataset, or a
> > datareader, then pull the data out from them and insert the data to a

SQL
> > Sever table.
> >
> > I wonder if there is any better way to transfer the Excel data to SQL
> > Server.
> >
> > Thanks for any hints.
> >
> > GD
> >
> >
> >



 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      1st Feb 2005
On Mon, 31 Jan 2005 17:27:04 -0600, "GD" <(E-Mail Removed)> wrote:

¤ Hi,
¤
¤ I am trying write a web application using ASP.Net to load an Excel file from
¤ client site and save all the data in the file to a table in SQL Server 2000.
¤
¤ My current assumption is: load Excel data to an ADO.Net dataset, or a
¤ datareader, then pull the data out from them and insert the data to a SQL
¤ Sever table.
¤
¤ I wonder if there is any better way to transfer the Excel data to SQL
¤ Server.
¤
¤ Thanks for any hints.

If the Excel file is on the client side then it will likely need to be uploaded to the server first,
or a network share where it is accessible.

http://www.stardeveloper.com/article...3031201&page=1
http://www.aspheute.com/english/20000802.asp

After the file is uploaded there is a good possibility that you can use SQL to insert the Excel data
into an existing SQL Server table.


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Practice - Transfer Data Neon520 Microsoft Excel Programming 2 17th Feb 2009 10:30 PM
Re: Best Practice - Transfer Data Neon520 Microsoft Excel Programming 0 17th Feb 2009 09:39 PM
How to Transfer data from Excel to SQL SERVER 2000 Ahmad Jalil Qarshi Microsoft Excel Misc 5 10th Jun 2005 08:57 PM
Data Transfer - Best Practice Paul Say Microsoft ADO .NET 3 4th Sep 2004 02:28 AM
Excel file data import to Sql server 2000 via the asp.net Sreedhar Vankayala Microsoft ASP .NET 2 25th Feb 2004 04:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:42 AM.