Re: sp_xml_removedocument can't find handle

From: Michael Rys [MSFT] (mrys_at_online.microsoft.com)
Date: 04/27/04


Date: Mon, 26 Apr 2004 18:44:38 -0700

The handle lives until the connection is reset. Can you write a single
stored proc and call that instead of doing this inside an ASP page by
calling 3 stored procs?

Best regards
Michael

"Jack Zinn" <jzinn@verticalnet.com> wrote in message
news:acd853d3.0404261122.4298a049@posting.google.com...
> We are using an ASP page to create a handle to an XML document via
> sp_xml_preparedocument, then using that XML document to populate data
> within the database, and then removing the document. The code looks
> like this:
>
> ***************************************************************************
> '-- "f" is a file. The document can be large (10K to several MB)
> '-- gsp_create_xml_dom is a cover SP that simply calls
> '-- sp_xml_preparedocument and then returns the handle.
> strSQL = "EXECUTE gsp_create_xml_dom '" & f.ReadAll & "'"
> set rs = conn.execute (strSQL)
>
> XML_DOM = rs("XML_DOM_Handle")
>
> '-- Uses the XML document to populate data
> strSQL = "EXECUTE gsp_populate_data " & XML_DOM
> set rs = conn.execute (strSQL)
>
> '-- Removes the document from memory
> strSQL = "EXECUTE sp_xml_removedocument " & XML_DOM
> set rs = conn.execute (strSQL)
> ***************************************************************************
>
> When we run it, we get the following error message:
> Microsoft OLE DB Provider for SQL Server error '80040e14'
>
> Could not find prepared statement with handle 1.
>
> One odd thing is that it ALWAYS returns the handle of 1 (i.e., XML_DOM
> == 1). Is this because each ASP page is called in its own process?
> Does that mean that when the process is completed (at the end of the
> page), the handle and the memory resident document are removed anyway?
> If it does, it probably means that sp_xml_removedocument is not
> needed. If it doesn't, does anyone know what to do to get this to
> work?
>
> -- Jack Zinn



Relevant Pages

  • ASP ADO SP call returning closed recordset
    ... This was originally posted to comp.databases.ms-sqlserver, but no response ... Can anybody tell me why a) when running a stored proc from an asp page to ... 'execute the SP returning the result into a recordset ...
    (microsoft.public.sqlserver.programming)
  • Passing comma seperated values to a stored proc
    ... They can type in multiple IDs if they are seperated ... I want to pass this string into a Stored Proc and just use an ... "in" command in the where clause to return a recordset back to the ASP page. ... "Syntax error converting the varchar value '123456,123457,123458' to a ...
    (microsoft.public.sqlserver.programming)
  • Re: DTS Through ASP Page permissions
    ... I am running an asp page calling the stored proc. ... when I execute a package from a SQL Agent job using DTSRUN, ... you can capture your DTS execution in a log file. ...
    (microsoft.public.sqlserver.dts)
  • Re: Stored Proc using MS Application Blocs
    ... It turned out I was looking at the wrong stored proc. ... This causes the debug mode to run very strangely but you ... > exception it is, so that I can decide where the exception was thrown? ... If this is a SQL server error ...
    (microsoft.public.dotnet.framework.adonet)
  • ASP, ADO and Paging - Not Working
    ... Hi all...I have a stored proc that works fine except I can't get the ... paging property to work in ASP. ... SQL withing the SP is causing the problem. ... In my ASP page, the pagecount property returns ...
    (microsoft.public.data.ado)

Quantcast