If the Excel file will always be the same structure, (and after some
preliminary checks to make sure it is etc.), set-up a DTS package and then
execute it when desired from ASP.
If you save the DTS package as a job, (from memory... )... you will be able
to execute it using sp_execute_job.
From my system where I do this:
objConn.Execute "usp_ImportPayslipsDTS", , adExecuteNoRecords +
CREATE Procedure usp_ImportPayslipsDTS
set nocount on
EXEC msdb.dbo.sp_start_job job_name = 'Payslips Import'
"midwesthills" <midwesthillshotmail.com> wrote in message
news:1f28b412.0408020548.1388b938posting.google.c om...> I'm trying to import data from an Excel spreadsheet, and write it into
> a SQL Server database. I know how to read the data from Excel and how
> to write the data to SQL Server. The part I'm struggling with is
> moving the data from Excel to the DB. I'd like to just open a
> recordset from Excel, then write that same recordset to the DB-- just
> not sure how that's done. I've tried it a couple different ways with
> no luck. Could someone please give me some guidance on this? Thank
> you in advance for the help!