Posted by Erland Sommarskog on 03/14/06 00:55
Ryan (ryanofford@hotmail.com) 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@sommarskog.se
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
Navigation:
[Reply to this message]
|