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.


.



<