Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    7

    Unanswered: inserting text > 65535

    hi,
    i want to insert text of size > 65535 in a text column of sql-server. I'm presently using mcp command to do this, but this utility doesn't allow these long files, and work well upto 65 kb files.
    is there a way out.
    thanks in advance

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    This error had been noted back in Version 4.2 of SQL, see technet article
    BUG: BCP Cannot Copy Text/Image Data > 64K from SQL Server (Q111921)

    Try setting the packet size on BCP (flag -a) to the max which is 65535
    MCDBA

  3. #3
    Join Date
    Jun 2002
    Posts
    7
    That doesn't work... I set the size 100000. When I inserted small files that were loaded smoothly. But for bigger files it says max packaet size is 65k.

    I rephrase my problem again:::::
    =====================
    I'm working with sql server.
    I need to load large xml files in the databse, fragment it into the
    tables.
    (1) I don't know a way to load file with the help of script that can load
    text value of > 65k. I'm presently doing with the help of "mcp" command.
    But this has got size limitation. So how do u load big file in some of the
    "text" field of a table.
    (2) I need to do fragmentation of this file. But I cannot declare text
    type variable in the procedure. I am able to parse files of upto 8000
    characters, but how do I do it if I have a document > 8000 char stored in
    a "text" field. I just don't know how to call sp_xml_preparedocument with
    a text attribute. I think u cannot say something like
    sp_xml_preparedocument @idoc out,(select textfield from doctable)
    where idoc and textfield are integer and text respectively.

Posting Permissions

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