Re: MSSQLError overwriting returning XML
- From: "Irwin Dolobowsky [MS]" <irwind@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 4 Apr 2005 14:44:32 -0700
There's no way to do this directly, no. You could apply an XSLT to the
results of the template to strip out the errors. That would be my
suggestion.
Irwin
<grantmarcus@xxxxxxxxx> wrote in message
news:1112130864.698392.128370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello All,
>
> Is there a way to have an xml template call not just return the
> MSSQLError processing instructions but to also return a XML that I'm
> expected to receive?
>
> I am using Microsoft SQL Server 2000 with latest service pack, SQLXML
> 2.0, and Microsoft Windows Server 2003.
>
> My xml template calls a stored procedure that inserts some data into
> some tables and the stored procedure will always return some other data
> back in a XML (using for xml explicit). The table contains unique,
> foreign, and primary key constraints, so if the inserted data fails a
> constraint (for AuthNo column), the stored procedure will continually
> generates a new value for AuthNo and adds it into the table again.
>
> As you can see, if the xml template is called during high volume times,
> the database will raise errors on unique key constraint failures. I
> need to see my resultant XML, and I don't care about the number of
> MSSQLErrors PIs (from testing, I see a min of one PI and a max of 15
> PIs). I have two applications calling the xml template in two different
> ways, and have another application that explicitly calls the stored
> procedure.
>
> When explicitly calling the stored procedure using Query Analyzer, I
> see the errors being printed and also my generated XML. I believe that
> I always see the generated XML from my C application that calls the XML
> template with XMLDOM. I only see the MSQLErrors PI when my ASP page,
> using Javascript and Microsoft.XMLDOM, calls the XML template.
>
> In that ASP page scenario, I see that my stored procedure succeeded in
> adding data into the table. So somehow, the MSQLErrors PI is
> overwriting or needlessly clearing out my stored proc-generated XML.
> Can any of you help me figure out how to still have my generated XML be
> returned? If there's no errors, I see the sp-generated XML result fine.
>
> Before you ask or make any suggestions, yes, I need those unique
> constraints. I cannot use indexes to generate this AuthNo since I have
> to conform to a specific algorithm. I do not want to query the table
> for existence for an AuthNo to put in since there exist the possibility
> that the insert call would be too late because some other app also used
> the same AuthNo value.
>
> Please help,
> Marcus Grant
>
.
- Follow-Ups:
- Re: MSSQLError overwriting returning XML
- From: grantmarcus
- Re: MSSQLError overwriting returning XML
- Prev by Date: Re: SQL XMLBulkLoad not Loading
- Next by Date: Re: load XML documents to database
- Previous by thread: Re: SQL XMLBulkLoad not Loading
- Next by thread: Re: MSSQLError overwriting returning XML
- Index(es):
Relevant Pages
|