Re: Execution Plan Hinting
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 22:55:44 +0000 (UTC)
Ryan (ryanofford@xxxxxxxxxxx) writes:
{ ADO.BEGINTRANS }
delete from field_values where dealer_data_id = 274;
bulk insert field_values from '274.dat' with ('fa.txt');
{ ADO.COMMIT }
// Note there is no rollback on failure.
Is this the actual code? Judging from the error output, it appears
that you have some sort of a wrapper on ADO. ("TSafeADOQuery").
Are you able to reproduce the problem if you run this as
BEGIN TRANSACTION
delete from FIELD_VALUES where DEALER_DATA_ID = 274;
bulk insert FIELD_VALUES from 'c:\temp\274.dat'
with (formatfile = 'c:\temp\fa.txt');
COMMIT TRANSACTION
from Query Analyzer? Or does it only happen when you run from this
ADO thing?
My suspicion is that it only happens in the latter case. One idea is to
run a trace in Profiler. Keep an eye on the SPID column.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Execution Plan Hinting
- From: Ryan
- Re: Execution Plan Hinting
- From: Dan Guzman
- Re: Execution Plan Hinting
- From: Erland Sommarskog
- Re: Execution Plan Hinting
- From: Dan Guzman
- Re: Execution Plan Hinting
- From: Erland Sommarskog
- Re: Execution Plan Hinting
- From: Dan Guzman
- Re: Execution Plan Hinting
- From: Ryan
- Re: Execution Plan Hinting
- From: Dan Guzman
- Re: Execution Plan Hinting
- From: Ryan
- Execution Plan Hinting
- Prev by Date: Re: Getting list of recently added IDENTITY items
- Next by Date: Re: Problems with SQL 2000 and 2005 on same machine - Can't connect on 2000
- Previous by thread: Re: Execution Plan Hinting
- Next by thread: Re: Execution Plan Hinting
- Index(es):