I use the Bulk Insert into a stored procedure.
How to handle the error if it fails ?
Hi all - I'm trying to use BULK INSERT in Query Analyzer to get FTP data
into a table. I've created a very simple table, data file and format file
to test the BULK INSERT command:
BULK INSERT [MJB08 Wholesale]..[BCP_Test] FROM 'd:\bcp_test.dat'
WITH (FORMATFILE = 'd:\bcp_test.fmt')
I'm connecting to SQL Server 7 with admin rights and d: is a local drive. I
can't shake the following error message:
Server: Msg 4861, Level 16, State 1, Line 1
Could not bulk insert because file 'd:\bcp_test.dat' could not be opened.
Operating system error code 21(The device is not ready.).
I've tried putting the data and format files on various drives, including a
server drive and specifying the _complete_ path but I still get the same
error. Can someone please help me figure out what I'm doing wrong here?