Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 why cannot sql server open the file

Author  Topic 

istanbullu
Starting Member

2 Posts

Posted - 2006-12-01 : 10:50:56
I created a comma-seperated text file by exporting an Access table. I tried to bulk insert into into a SQL Server table using the following code:

BULK INSERT databasename.dbo.tablename FROM 'C:\commaseparatedfilename.txt'
WITH (FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n',
FIRSTROW=2)

but it returns the following error:

Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "C:\commaseparatedfilename.txt" could not be opened. Operating system error code 5(error not found).

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-01 : 10:54:35
Is this file located on the C drive of the SQL Server (Server, not client!!)?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

istanbullu
Starting Member

2 Posts

Posted - 2006-12-01 : 11:00:29
Yes exactly on the same disk drive.
Go to Top of Page
   

- Advertisement -