SQL Bulk insert works with query analyser but no as passthrough query in Access front end
Posted on 2006-10-25
I've got a Bulk insert sp in SQL Server 2000 which works fine but I get a Runtime error 3146 ODBC call failure when I try to run it as a passthrough query in Access.
The passthrough query works fine if I take the bulk insert out of the sp. I've added the login to the Bulk Insert administrators but no joy. Also, ran a trace while it was executing but couldn't see any problems - the batch appeared to complete without error
Here's the offending bulk insert snippet:
set @sql = "BULK INSERT #temp FROM '"
SET @sql = @sql + @filename
set @sql = @sql + "' WITH (DATAFILETYPE = 'char', FIRSTROW=1, ROWTERMINATOR = '\n') "
Help from experts please