bulk insert error

The directory and file is there nothing wrong with the network drive
Can anyone tell me how to resolve this error?

Could not bulk insert because file ' K:\Apps\orderlog\APAPORD1.txt ' could not be opened. Operating system error code 123(The filename, directory name, or volume label syntax is incorrect.).
LVL 3
ajaypappanAsked:
Who is Participating?
 
jacobhooverCommented:
Go to the command prompt on your dev machine and type:
NET<SPACE>USE<ENTER>
(Using the space and enter keys.)
Then look for the mapping for the K drive.  That should be the UNC path to substitue instead of K:\
0
 
skeeveswpCommented:
The usual problem I have run into with this is that the drive where the txt file resides may not be mapped the same way at the Server where SQL resides as on my dev box.  Have you tried using the UNC name of the drive rather than a mapped drive letter?

-- Steve
0
 
ajaypappanAuthor Commented:
i dnt know abt UNC drive
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
skeeveswpCommented:
UNC stands for Universal Naming Convention, and it is the way one computer designates another in a network environment.  One way to get the UNC for your target is as jacobhoover suggested.  Another is to go into Windows Explorer and click on Tools ... Map Network Drive on your dev machine.  The mapping dialog will contain a listing of drives you have already mapped, so you should be able to pull the UNC for your K drive from that list.

The idea of the UNC is to designate the host machine and the logical drive native to the host where the information exists.  When you are working in a client / server environment it can be difficult to know whether the K drive on your dev machine is even mapped on the server, much less what drive letter it may be assigned.  Using the UNC bypasses the mapping process and addresses the desired file directly.

For additional information on bulk insert, you might want to check out this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ba-bz_4fec.asp

-- Steve
0
 
ajaypappanAuthor Commented:
please delete this question
0
 
ajaypappanAuthor Commented:
i dnt want you to take any points from the members.. just close this question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.