import Excel worksheet to SQL Server table
You can try reading the data in excel and pushing the data into the
server either as APPEND queries (sql statements) (via
connection.execute ...) or as ADODB.Recordset.ADDNew. Try those out
and see if you gain any speed advantage. I would not be that surprised
if Server Management Studios native solution is faster than any 'home
made' but give it a shot - who knows.
I'm always pushing the data via the two above methods (append query or
recordset.addnew) so I wouldn't have a clue how it compares to the
wizard.
On May 1, 4:22*pm, DennisB wrote:
I have an ADO connection to SQL Server 2005 and I use SQL Server Management
Studio's import wizard to import Excel sheets to tables. *This is very time
consuming and I was wondering what would be the best way to import the files
to SQL using VBA from Excel. *I currently call various stored procedures from
VBA.
Any code snippets or help?
DennisB
|