Solved

bulk insert error

Posted on 2004-10-21
691 Views
Last Modified: 2012-05-05
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
Question by:ajaypappan
    6 Comments
     
    LVL 2

    Expert Comment

    by:skeeveswp
    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
     
    LVL 3

    Author Comment

    by:ajaypappan
    i dnt know abt UNC drive
    0
     
    LVL 7

    Accepted Solution

    by:
    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
     
    LVL 2

    Assisted Solution

    by:skeeveswp
    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
     
    LVL 3

    Author Comment

    by:ajaypappan
    please delete this question
    0
     
    LVL 3

    Author Comment

    by:ajaypappan
    i dnt want you to take any points from the members.. just close this question
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    This article describes some very basic things about SQL Server filegroups.
    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now