Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: Bulk insert problem

    Hey,

    I am trying to do a bulk insert from a txt file. I am trying to allow the query to read the txt file off the users local computer. This is the code I am using:

    BULK INSERT TbleTestBulk
    FROM 'C:\westportela.dat'
    WITH
    (
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )

    I also tried this

    BULK INSERT TbleTestBulk
    FROM '\\host_name\C$\westportela.dat'
    WITH
    (
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )

    and this

    BULK INSERT macomber
    FROM '\\wcsserver\SSP\txt frm mms\WES.txt'
    WITH
    (
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )

    none work.

    I basically get this error for each:
    Server: Msg 4861, Level 16, State 1, Line 1
    Could not bulk insert because file '\\wcsserver\SSP\txt frm mms\WES.txt' could not be opened. Operating system error code 53(The network path was not found.).

    Anyone got any suggestions. I am really new to this so all help would be welcomed.

    Thanks

    Mike
    Last edited by mcbmoreno; 02-10-04 at 13:50.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Did the client share that location?

    Why not copy the file to the server...I would suggest that that is the preferred method...you would want to take the network out of the equation when loading or dumping data...


    My own opinion (MOO) *

    * Actually not really...it's in a few books I've read
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •