Re: For XML Problem with IIS6 and W2k3

From: Bertan ARI [MSFT] (bertan_at_online.microsoft.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 13:24:06 -0700

You can send your case directly to me: bertan at gmail dot com. Please,
iclude your vb script and query, your schema/template if there is any.

In the mean time, I don't see that you are using IIS anywhere here. You are
simply using ADO. IIS shouldn't be the issue here.

I am afraid your problem lies somewhere in your machine/system
configurations. The only issue I know for SqlXml3 on Win2003 is that you
have to install Soap toolkit seperately.

Thanks.

-- 
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"ajsmith02" <ajsmith02@discussions.microsoft.com> wrote in message
news:318557E2-0C62-4CDC-A964-F3EDE4A87CD4@microsoft.com...
> To specify the problem.  This chunk of code has been working for about 3
> years on IIS5 and W2K.  The sql that gets executed is passed in as a
string
> variable.  To answer your question the for xml queries always runs
correctly
> in sql server.  In the IIS6 and W2k3 combo this code runs fine for days
and
> then all of a sudden it bombs without an error message.  I have isolated
the
> place in the asp code snippet below on this line:
>
> adoCmd.Execute , , adExecuteStream
>
> My next step is to recycle the application pool and for the most part that
> gets things going again.  Sometimes I have to restart IIS and still
sometimes
> I have to reboot the server all together.  If something where wrong with
the
> code then it should never work.  If something were wrong with the sql
being
> executed then I should get a sql server error.
>
> Thanks for the reply.
>
> "Michael Rys [MSFT]" wrote:
>
> > Can you run the FOR XML query directly on the database?
> >
> > Have you tried a different template/query to see if the connection
works?
> >
> > Best regards
> > Michael
> >
> > "ajsmith02" <ajsmith02@discussions.microsoft.com> wrote in message
> > news:C73A1C66-4B94-489C-BA5F-6821CEB095A5@microsoft.com...
> > >I have this function that worked like a charm under IIS5 and W2K.  You
pass
> > >a
> > > sql string that has for xml auto or a stored produre that has for xml
auto
> > > in
> > > it.  Under IIS6 and W2K3 it stops working after a couple of days with
no
> > > rhyme or reason.  No error log either.  We applied all the service
packs
> > > including sqlxml sp3.  What is wrong? Thanks.
> > >
> > > Here is the code:
> > > function getSQLXML(byval sqlString)
> > > dim adoConn
> > > dim adoCmd
> > > dim adoStreamQuery
> > > set adoConn = vbsqlconnection 'located in sharedfunctions.asp
> > > adoConn.CommandTimeout = 300
> > >
> > > set adoStreamQuery = Server.CreateObject("ADODB.Stream")
> > > set adoCmd = Server.CreateObject("ADODB.Command")'
> > > adoCmd.ActiveConnection = adoConn
> > > adoCmd.CommandTimeout = 300
> > > adoConn.CursorLocation =  adUseClient
> > >
> > > dim sQuery
> > > sQuery = "<recordset xmlns:sql='urn:schemas-microsoft-com:xml-sql'>"
> > > sQuery = sQuery + "<sql:query>"+sqlString+"</sql:query>"
> > > sQuery = sQuery + "</recordset>"
> > >
> > > adoStreamQuery.Open    'Open the command stream so it may be written
to
> > > adoStreamQuery.WriteText sQuery, adWriteChar   'Set the input command
> > > stream's text with the query string
> > > adoStreamQuery.Position = 0   'Reset the position in the stream,
otherwise
> > > it will be at EOS
> > >
> > > adoCmd.Dialect = "{5D531CB2-E6Ed-11D2-B252-00C04F681B71}"   'Set the
> > > dialect for the command stream to be a SQL query.
> > > adoCmd.CommandStream = adoStreamQuery     'Set the command object's
> > > command
> > > to the input stream set above
> > >
> > > dim outStrm
> > > set outStrm = Server.CreateObject("ADODB.Stream")     'Create the
output
> > > stream
> > > outStrm.Open
> > >
> > > adoCmd.Properties("Output Stream").Value = outStrm  'Set command's
output
> > > stream to the output stream just opened
> > > adoCmd.Execute , , adExecuteStream
> > > 'Response.Write(outStrm.ReadText)
> > > adoCmd.ActiveConnection = nothing
> > > adoConn.Close
> > > set adoConn = nothing
> > > getSQLXML = outStrm.ReadText
> > > end function
> > >
> > > P.S. Goorbeeman in the group microsoft.public.sqlserver.server has the
> > > same
> > > problem
> >
> >
> >


Relevant Pages

  • Re: Calendar Form
    ... If it's the name of a query, I need to see the SQL of that query. ... My Calendar form opens, and I can add information into it, as well as ... The fact that the previous line (Dim db As DAO.Database) doesn't ...
    (microsoft.public.access.forms)
  • Re: Calendar Form
    ... If it's the name of a query, I need to see the SQL of that query. ... To see the SQL of a query, open the query in Design view, then select SQL View from the View menu. ... Is there perhaps a way that I can insert a combo box on my calendar form for "CompanyName", in which I can select a company from the list, and then add/view information on the calendar for that specific company? ... The fact that the previous line (Dim db As DAO.Database) doesn't cause problems implies that the DAO library is properly referenced. ...
    (microsoft.public.access.forms)
  • Re: Ordering a filtered proximity search
    ... >>> search variable, filtering it, and ordering it at the same time. ... >>> appended query approach. ... if p1 is empty then your SQL syntax is messed up. ... Dim SearchTerm1 ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Building SQL statement in VBA. Getting 3131 Runtime Error in FROM clause :@
    ... Number of characters in a cell in the query design grid 1,024 ... Since the SQL parser mentions an error in the FROM clause, ... The only problem I can see is the SQL string is very long. ... Dim qdf As QueryDef ...
    (microsoft.public.access.queries)
  • Re: SQL help
    ... query and output the record count to another text box on the same form ... Dim strTotalships as string ... Can you help with this portion of the SQL statement? ...
    (comp.databases.ms-access)