Re: VBA - Create a recordset with no records for inserting



INTP56 wrote:
Bob,

Thanks, that WHERE 1=2 trick is just what I needed.

And, you were also right that this is not the way to do this. I ended
up killing the process after 5 minutes. I never expected calling the
stored procedure 100,000 times would be so much faster than
ADODB.Recordset.UpdateBatch.

If you use SQL Profiler to check out what is happening behind the
scenes, you'll see why.

In my case, I need to be in Excel to gather the data because it's
spread all over the workbook in human friendly form. We tried
submitting the workbooks directly and using SSIS to do this, and our
conclusion was we shouldn't be getting SSIS involved until we had our
data suitable for bulk insert.


What about putting the data into a text file and using BULK INSERT (look
it up in BOL) to bring it into sql?



--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • RE: Copy Very large Table
    ... BULK INSERT or SSIS. ... I recommend that you use SSIS to transfer the large data table from SQL 7.0 ... there is an article discussing the performance strategy of SSIS and ...
    (microsoft.public.sqlserver.tools)
  • Re: SSIS/DTS or simple insert?
    ... specially if you have to load a large volume of data. ... the import data wizard will create the SSIS package for you with the bulk ... the TSQL version of the bulk insert works when the source is a flat file. ... >>>I need to dump Access MDB files to SQL Server 2005. ...
    (microsoft.public.sqlserver.dts)
  • Re: Whats the best way to open a recordset for insert only?
    ... BULK INSERT and DTS proved impracticable. ... Which meant writing a ... standalone program to do it. ... Please reply to the newsgroup. ...
    (microsoft.public.data.ado)
  • Re: BF2 : patch v1.03 officialy delayed (!)
    ... Perhaps you would like them to release a broken patch just because ... some lame twat on a newsgroup says so, but the bulk of us would prefer ...
    (comp.sys.ibm.pc.games.action)
  • Re: SQL server and ASP
    ... I've run SQL profiler and it appears to execute the delete statement AND the ... account has to have the approptiate permissions on the access file but ... > The JetSQL syntax for multiple table delete and update statements is ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)