dbTalk Databases Forums  

OPENXML debugging

microsoft.public.sqlserver.xml microsoft.public.sqlserver.xml


Discuss OPENXML debugging in the microsoft.public.sqlserver.xml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Johnathan Seal
 
Posts: n/a

Default OPENXML debugging - 05-18-2005 , 05:06 PM






I am working on my first project that uses OPENXML.
From VS 2003, I am executing a sp.
I am hitting problems with the sp and since this uses OPENXML, I could use
pointers debugging.
I did not see anything for the subject on msdn. Please help.
--
Many Thanks.
- Johnathan

Reply With Quote
  #2  
Old   
Michael Rys [MSFT]
 
Posts: n/a

Default Re: OPENXML debugging - 05-24-2005 , 01:58 AM






Could you provide some information about the error you are getting, and
maybe a repro case of the stored proc that one could run via query analyzer?

Thanks
Michael

"Johnathan Seal" <JohnathanSeal (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am working on my first project that uses OPENXML.
From VS 2003, I am executing a sp.
I am hitting problems with the sp and since this uses OPENXML, I could use
pointers debugging.
I did not see anything for the subject on msdn. Please help.
--
Many Thanks.
- Johnathan



Reply With Quote
  #3  
Old   
Johnathan Seal
 
Posts: n/a

Default Re: OPENXML debugging - 05-24-2005 , 12:20 PM



Thanks for responding Michael.
In a nut shell this is what I have done:
I created a stored procedure on SQL 2000 much like the MSDN article
prescribed.
The code then called the stored procedure - again, much like the MSDN
article prescribed.
When I ran the code, I got a non discript throw at the line the stored
procedure was called. I did turn on T-SQL debugging when the throw was
caught - but this did not help.
What I ended up doing was creating the stored procedure in code (via
StringBuilder) and calling it. This gave me the clues I needed to debug
further.

Comments: The work around I used gave the needed debug feedback but it is
not as 'clean' a solution.
If the work around is the best practice, can the MSDN article be changed?
The original question: is there a way to get the same level of debug
feedback when the call to the stored procedure fails as with the workaround?
Please note that the confusion partly stems from the fact that OPENXML is new
to me. Due to the way the stored procedure is written, debugging seems
ackward as it seems it must be called from 'other code' to debug.

I can offer the code example, but I just wanted to get to attemtp to get to
the point of the matter first. Please let me know if you still need the code?
FYI: the problem with the stored procedure was a PK violation.

Thanks, Johnathan

--
Many Thanks.
- Johnathan


"Michael Rys [MSFT]" wrote:

Quote:
Could you provide some information about the error you are getting, and
maybe a repro case of the stored proc that one could run via query analyzer?

Thanks
Michael

"Johnathan Seal" <JohnathanSeal (AT) discussions (DOT) microsoft.com> wrote in message
news:98B14AAD-B544-4C2B-950A-41BB73DEA8CB (AT) microsoft (DOT) com...
I am working on my first project that uses OPENXML.
From VS 2003, I am executing a sp.
I am hitting problems with the sp and since this uses OPENXML, I could use
pointers debugging.
I did not see anything for the subject on msdn. Please help.
--
Many Thanks.
- Johnathan




Reply With Quote
  #4  
Old   
Michael Rys [MSFT]
 
Posts: n/a

Default Re: OPENXML debugging - 05-24-2005 , 07:51 PM



Hi Jonathan

If you got a PK violation, I doubt that the XML aspect had anything to do
with it. You could probably have gotten the same error behaviour, if you
would have read the data from a temporary table for example.

I am a bit confused re your debug feedback. SQL Server 2000 does not really
support T-SQL debugging (SQL 2005 will). So you will have to run your T-SQL
statement in the query analyzer for example to see where in the batch the
error occurs. Double-clicking on the error should take you to the line where
the error occurred.

Best regards
Michael

"Johnathan Seal" <JohnathanSeal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for responding Michael.
In a nut shell this is what I have done:
I created a stored procedure on SQL 2000 much like the MSDN article
prescribed.
The code then called the stored procedure - again, much like the MSDN
article prescribed.
When I ran the code, I got a non discript throw at the line the stored
procedure was called. I did turn on T-SQL debugging when the throw was
caught - but this did not help.
What I ended up doing was creating the stored procedure in code (via
StringBuilder) and calling it. This gave me the clues I needed to debug
further.

Comments: The work around I used gave the needed debug feedback but it is
not as 'clean' a solution.
If the work around is the best practice, can the MSDN article be changed?
The original question: is there a way to get the same level of debug
feedback when the call to the stored procedure fails as with the
workaround?
Please note that the confusion partly stems from the fact that OPENXML is
new
to me. Due to the way the stored procedure is written, debugging seems
ackward as it seems it must be called from 'other code' to debug.

I can offer the code example, but I just wanted to get to attemtp to get
to
the point of the matter first. Please let me know if you still need the
code?
FYI: the problem with the stored procedure was a PK violation.

Thanks, Johnathan

--
Many Thanks.
- Johnathan


"Michael Rys [MSFT]" wrote:

Could you provide some information about the error you are getting, and
maybe a repro case of the stored proc that one could run via query
analyzer?

Thanks
Michael

"Johnathan Seal" <JohnathanSeal (AT) discussions (DOT) microsoft.com> wrote in
message
news:98B14AAD-B544-4C2B-950A-41BB73DEA8CB (AT) microsoft (DOT) com...
I am working on my first project that uses OPENXML.
From VS 2003, I am executing a sp.
I am hitting problems with the sp and since this uses OPENXML, I could
use
pointers debugging.
I did not see anything for the subject on msdn. Please help.
--
Many Thanks.
- Johnathan






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.