Professional Web Applications Themes

to create a xml file once I have the hdoc handle - Microsoft SQL / MS SQL Server

Hi I have a SP that inserts records from an xml string created by ado. THe SP works fine except in a few cases, where it does not insert a complete record into the DB. It truncates a few characters will inserting However it is noticed that the records before and after the particular row in question are inserted correctly. I am trying to debug this issue for which I want to know how to create a xml file once I have the hdoc handle i would like to avoid the openxml, since I want to see if the error ...

  1. #1

    Default to create a xml file once I have the hdoc handle

    Hi

    I have a SP that inserts records from an xml string created by ado.

    THe SP works fine except in a few cases, where it does not insert a complete
    record into the DB. It truncates a few characters will inserting
    However it is noticed that the records before and after the particular row
    in question are inserted correctly. I am trying to debug this issue for
    which I want to know

    how to create a xml file once I have the hdoc handle

    i would like to avoid the openxml, since I want to see if the error occured
    before the insert statement that uses openxml clause

    thanks

    jeune



    Joe Guest

  2. #2

    Default Re: to create a xml file once I have the hdoc handle

    Joe
    Can you show us your code?

    "Joe" <com> wrote in message
    news:phx.gbl... 
    complete 
    occured 


    Uri Guest

  3. #3

    Default Re: to create a xml file once I have the hdoc handle

    Here we go

    CREATE PROCEDURE StoreProc
    IngestData ntext
    AS

    DECLARE hDoc int

    -- UNTIL HERE THE INGEST DATA HAS EVERYTHING REQUIRED

    exec sp_xml_preparedoent hDoc OUTPUT,IngestData, '<root
    xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"/>'

    -- MAYBE AFTER THE CREATION OF THE HDOC THE ERROR CROPPED IN????
    -- I WOULD LIKE TO CREATE THE XML FILE HERE THIS POINT

    INSERT INTO table (IngestData)
    SELECT INGEST
    FROM OPENXML (hDoc,'xml/rs:data/rs:insert/z:row',0)
    WITH (INGEST varchar(2048))
    GO

    here is the part of the xml
    "<xml xmlns:s=""uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882""
    xmlns:dt=""uuid:C2F41010-65B3-11d1-A29F-00AA00C14882""
    xmlns:rs=""urn:schemas-microsoft-com:rowset"" xmlns:z=""#RowsetSchema"">
    <s:Schema id=""RowsetSchema""> <s:ElementType name=""row""
    content=""eltOnly"" rs:updatable=""true""> <s:AttributeType name=""INGEST""
    rs:number=""1"" rs:write=""true""> <s:datatype dt:type=""string""
    rs:dbtype=""str"" dt:maxLength=""1000"" rs:precision=""0""
    rs:maybenull=""false""/> </s:AttributeType> <s:extends type=""rs:rowbase""/>
    </s:ElementType> </s:Schema> <rs:data> <rs:insert> <z:row
    INGEST=""137890,24723L,2003/05/27,31,2,2003/05/27,8,0.25,5,0.25,6,0.25,5,0.2
    5,6,0.25,1,0.25,2,1000,4,0.26,3,0.27,4,0.26,3,0.27 ;""/>
    </rs:insert>
    </rs:data></xml>
    "
    this is however only a part of the xml doent

    thanks

    Jeune
    "Uri Dimant" <co.il> wrote in message
    news:phx.gbl... 
    > complete [/ref]
    row 
    > occured 
    >
    >[/ref]


    Joe Guest

Similar Threads

  1. Handle file download
    By wdamn in forum Macromedia Flash Flashcom
    Replies: 8
    Last Post: April 17th, 04:02 PM
  2. how to create a script to handle both alpha and motion?
    By FayeC in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: January 26th, 09:48 AM
  3. OO file handle for stdout
    By Eric J. Roode in forum PERL Miscellaneous
    Replies: 2
    Last Post: August 5th, 02:50 AM
  4. handle file > 2GB
    By cc in forum UNIX Programming
    Replies: 2
    Last Post: July 7th, 05:15 PM
  5. Replies: 3
    Last Post: July 2nd, 02:57 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139