Re: MSSQLError overwriting returning XML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>


.



Relevant Pages

  • Re: edit xml file.
    ... should know that Nokogiri is widely considered the best Ruby XML library ... you might consider using Nokogiri over REXML. ... don't think it is a good idea to modify your template. ... If you decide you want to do that, the Sinatra code below should talk about ...
    (comp.lang.ruby)
  • Re: tab and return in mail merge
    ... I don't know about Content Control facilities and I don't see where the .net ... My "template" is saved in Word XML format. ... I am wondering what you mean by a "template" in CRM. ...
    (microsoft.public.word.vba.general)
  • Re: Data entry environment using Word 2003
    ... I suggest using a template centered around the use of Styles, Tables, ... add if VBA can be used Document Variables. ... deletion since style before and after for every element in your document is ... you mean that you wish to use xml schemas and stylesheets then ...
    (microsoft.public.office.developer.web.components)
  • Re: How to serialize Mfc template dialog class ?
    ... I do not believe you can derive a template class from CObject, ... MFC serialization is among the worst possible ways to implement persistent ... tend to use either simple text files or XML files if I have complex structured data. ... ignored the binary form of the file and read the XML form [yes, ...
    (microsoft.public.vc.mfc)
  • Re: Data entry environment using Word 2003
    ... I suggest using a template centered around the use of Styles, Tables, ... add if VBA can be used Document Variables. ... deletion since style before and after for every element in your document is ... you mean that you wish to use xml schemas and stylesheets then ...
    (microsoft.public.office.developer.vba)