• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 698
  • Last Modified:

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.).
0
ajaypappan
Asked:
ajaypappan
  • 3
  • 2
2 Solutions
 
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
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now