Click here to Skip to main content
15,890,845 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Help Pin
Mike Ellison3-Aug-09 3:28
Mike Ellison3-Aug-09 3:28 
AnswerRe: Help Pin
Richard MacCutchan31-Aug-09 23:37
mveRichard MacCutchan31-Aug-09 23:37 
AnswerRe: Help - Further Information Pin
Richard MacCutchan1-Sep-09 5:47
mveRichard MacCutchan1-Sep-09 5:47 
QuestionHow to response XMl format using SOAP protocol Pin
Sasmi_Office30-Jul-09 22:55
Sasmi_Office30-Jul-09 22:55 
QuestionxmlTextWriter error Pin
newXMLdeveloper28-Jul-09 6:57
newXMLdeveloper28-Jul-09 6:57 
QuestionRegarding the SOAP message Request and Response Pin
Sasmi_Office27-Jul-09 20:01
Sasmi_Office27-Jul-09 20:01 
Questioncreate xml .. [modified] Pin
Rajeshwar Code- Developer27-Jul-09 4:35
Rajeshwar Code- Developer27-Jul-09 4:35 
QuestionThe XML parse error 0xc00ce556 occurred on line number 1 Pin
Vimalsoft(Pty) Ltd24-Jul-09 0:59
professionalVimalsoft(Pty) Ltd24-Jul-09 0:59 
Good Day all

I have an SP that is defined like this
ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext,
@TTBLType varchar(5)

AS

set nocount on

DECLARE @xmldoc int
DECLARE @sql varchar(8000)

-- In one long sql string do all of the following
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @xmldoc OUTPUT, @xml



if exists (select * from [tempdb].[dbo].sysobjects where id = object_id(N'[tempdb].[dbo].[#Constraints]'))
  drop table [#Constraints]

-- turn the xml into a table with characteristics of the given table
SELECT *
INTO #Constraints
FROM OPENXML ( @xmldoc , '/Root/Row' , 2)
WITH     (
        [ID] int,        -- ID of the activitiy or contact (XM) to update
        DayOp char(7) 'Day_Action',
        [Day] int 'Day',
        SessOp char(7) 'Period_Action',
        Sess int 'Period'
       
    )

EXEC sp_xml_removedocument @xmldoc

--select * from #Constraints

update #Constraints  set [Day] = null where [Day] = 0    -- can't have [Day] <, = or > 0
update #Constraints  set [Sess] = null where [Sess] = 0    -- can't have [Day] <, = or > 0

-- todo make this generic for class or exam
update tbl_actv
    set [Day] = #Constraints.[Day],
        DayOp = case(#Constraints.[DayOp])
                    when 'on' then '='
                    when 'before' then '<'
                    when 'after' then '>'
                end,
        Session = #Constraints.Sess,
        SessOp = case(#Constraints.[SessOp])
                    when 'on' then '='
                    when 'before' then '<'
                    when 'after' then '>'
                end
    from #Constraints
    where #Constraints.ID = tbl_actv.ID


and i have have tried to execute it like this

exec sp_Constraints_Update 'EXAM','<Root><Row><ID>3</ID><Activity>ACC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>15</Day><Period_Action>on</Period_Action><Period>15</Period></Row><Row><ID>9</ID><Activity>ADM121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>4</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>13</ID><Activity>ADM122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>7</Period></Row><Row><ID>50</ID><Activity>BEC122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>12</Day><Period_Action>on</Period_Action><Period>143</Period></Row><Row><ID>44</ID><Activity>BEC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>12</Day><Period_Action>on</Period_Action><Period>12</Period></Row><Row><ID>126</ID><Activity>MRK122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>287</ID><Activity>ENGL321 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>21</Period></Row><Row><ID>288</ID><Activity>ENTR_E_221 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>289</ID><Activity>FRAN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>290</ID><Activity>GRMN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>291</ID><Activity>LATN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>292</ID><Activity>LATN211 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>293</ID><Activity>LATN311 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>294</ID><Activity>LATN321 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>295</ID><Activity>LEER_E_111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>296</ID><Activity>LEER_R_111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>297</ID><Activity>LLBR111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>298</ID><Activity>LLBR113 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>299</ID><Activity>LLBR114 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>300</ID><Activity>LLBR211 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row></Root>'


and i got the Following Error

The XML parse error 0xc00ce556 occurred on line number 1, near the XML text "EXAM".
Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1
The error description is 'Invalid at the top level of the document.'.
Msg 8179, Level 16, State 5, Procedure sp_Constraints_Update, Line 24
Could not find prepared statement with handle 0.
The statement has been terminated.
Msg 6607, Level 16, State 3, Procedure sp_xml_removedocument, Line 1
sp_xml_removedocument: The value supplied for parameter number 1 is invalid.
Msg 208, Level 16, State 0, Procedure sp_Constraints_Update, Line 40
Invalid object name '#Constraints'.


I thought the Problem was on C# side , while troubleshooting i came to the SP and found that the execution of the sp is a problem.

Thank you

Vuyiswa Maseko,

Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: The XML parse error 0xc00ce556 occurred on line number 1 Pin
DoctorMick24-Jul-09 1:17
DoctorMick24-Jul-09 1:17 
GeneralRe: The XML parse error 0xc00ce556 occurred on line number 1 Pin
Vimalsoft(Pty) Ltd24-Jul-09 1:24
professionalVimalsoft(Pty) Ltd24-Jul-09 1:24 
Questionweb application with XML Pin
ashwika4923-Jul-09 1:35
ashwika4923-Jul-09 1:35 
AnswerRe: web application with XML Pin
Muhammad Mazhar23-Jul-09 2:10
Muhammad Mazhar23-Jul-09 2:10 
AnswerRe: web application with XML Pin
Mike Ellison27-Jul-09 2:42
Mike Ellison27-Jul-09 2:42 
QuestionSpecifying unqiueness of an attribute in xsd. Pin
Comp_Users21-Jul-09 10:16
Comp_Users21-Jul-09 10:16 
AnswerRe: Specifying unqiueness of an attribute in xsd. Pin
Stuart Dootson21-Jul-09 11:15
professionalStuart Dootson21-Jul-09 11:15 
GeneralRe: Specifying unqiueness of an attribute in xsd. Pin
Comp_Users21-Jul-09 22:45
Comp_Users21-Jul-09 22:45 
QuestionHow to ignore tags ? Pin
matty2desmara17-Jul-09 5:06
matty2desmara17-Jul-09 5:06 
AnswerRe: How to ignore tags ? Pin
Stuart Dootson17-Jul-09 13:18
professionalStuart Dootson17-Jul-09 13:18 
QuestionShould I be using XSLT to transform XML to Multiple EDI formats and vice versa? Pin
tig281015-Jul-09 23:57
tig281015-Jul-09 23:57 
AnswerRe: Should I be using XSLT to transform XML to Multiple EDI formats and vice versa? Pin
Stuart Dootson16-Jul-09 0:39
professionalStuart Dootson16-Jul-09 0:39 
GeneralRe: Should I be using XSLT to transform XML to Multiple EDI formats and vice versa? Pin
tig281016-Jul-09 2:55
tig281016-Jul-09 2:55 
QuestionHow to get Microsoft Infopath XML generated file to work with the Web? Pin
kcgnd15-Jul-09 2:01
kcgnd15-Jul-09 2:01 
AnswerRe: How to get Microsoft Infopath XML generated file to work with the Web? Pin
Sandy_L_Schultz18-Jul-09 8:20
Sandy_L_Schultz18-Jul-09 8:20 
GeneralRe: How to get Microsoft Infopath XML generated file to work with the Web? Pin
Sandy_L_Schultz19-Jul-09 12:43
Sandy_L_Schultz19-Jul-09 12:43 
GeneralRe: How to get Microsoft Infopath XML generated file to work with the Web? Pin
Member 120804822-Jul-09 8:52
Member 120804822-Jul-09 8:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.