Re: Transfer data from Excel to SQL Server
- From: "Barry Seymour" <bseymour@xxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 14:19:43 -0700
Use the ADO.CopyFromRecordset method.
"Billy Rogers" <BillyRogers@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:25C56DA1-C217-444C-BF4C-65DE4AEE48DF@xxxxxxxxxxxxxxxx
What's the best way to transfer data from Excel to SQL Server?
I have the SQL server table set up and the spread*** is set up like the
table with field names in the first row and data below. There are over 3000
rows and the number of rows could vary each month when the process is run.
Should I loop through each row and execute a SQL INSERT statement (using
ADO) for each row?
Should I add all 3000 rows to a recordset and then use the Update method of
the recordset?
Or is there some other method that's better for moving the data?
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"
Billy Rogers
Currently Using SQL Server 2000, Office 2000 and Office 2003
http://thedataguru.blogspot.com/
.
- Follow-Ups:
- Re: Transfer data from Excel to SQL Server
- From: Bob Barrows [MVP]
- Re: Transfer data from Excel to SQL Server
- References:
- Transfer data from Excel to SQL Server
- From: Billy Rogers
- Transfer data from Excel to SQL Server
- Prev by Date: XML to ADO Recordset and Back again
- Next by Date: Re: XML to ADO Recordset and Back again
- Previous by thread: Re: Transfer data from Excel to SQL Server
- Next by thread: Re: Transfer data from Excel to SQL Server
- Index(es):