Wednesday, March 21, 2012

Nada

sConn = "Provider=SQLOLEDB.1;Data Source=sss;UId=aaaa; Pwd=vvvvv; Initial Catalog=mydb"
What does it mean if you run an output stream and get absolutely nothing by way of XML back and no messages etc.
I get the XSL output but no XML to go with it. Is ther a way of discovering if I get any XML back. My stored procedure works and gives output but not when run from the ASP.
adoCmd.Properties("Output Stream") = response
adoCmd.Execute null, null, adExecuteStream
"Richard P" <anonymous@.discussions.microsoft.com> wrote in message
news:61C9FE51-7680-4517-BE2D-F0CCE59EC8E8@.microsoft.com...
[snip]
> What does it mean if you run an output stream and get absolutely nothing
by way of XML back and no messages etc.
What does your query look like?
Bryant
|||By query, do you mean what I pass into the stream or the stored procedure?
The query is
<DATA xmlns:sql='urn:schemas-microsoft-com:xml-sql'><sql:header><sql:param name='scheme'>10000067</sql:param></sql:header><sql:query>exec sp100pamenu_select @.ClientID</sql:query></DATA>
The code to use the above query is the same as code from another project that works against a different database that resides on a different Server.
The parameter in the stored procedure is defined as an integer, see below.
@.ClientID INT
|||http://www.bernardbelanger.com/computing/NaDa/
|||The Stored Procedure is a FOR XML query, correct?
Irwin Dolobowsky
Program Manager - SqlXml
http://weblogs.asp.net/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard P" <anonymous@.discussions.microsoft.com> wrote in message
news:EB4AA9AA-E7CF-4420-B23A-C9ED99C32AE0@.microsoft.com...
> By query, do you mean what I pass into the stream or the stored procedure?
> The query is
> <DATA xmlns:sql='urn:schemas-microsoft-com:xml-sql'><sql:header><sql:param
name='scheme'>10000067</sql:param></sql:header><sql:query>exec
sp100pamenu_select @.ClientID</sql:query></DATA>
> The code to use the above query is the same as code from another project
that works against a different database that resides on a different Server.
> The parameter in the stored procedure is defined as an integer, see below.
> @.ClientID INT
>
|||Yes, it uses :
FOR XML EXPLICIT
GO
|||Oh, in the template header you define "scheme" as the parameter name but in
the call you use "@.ClientID". Why is that?
Irwin Dolobowsky
Program Manager - SqlXml
http://weblogs.asp.net/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard P" <anonymous@.discussions.microsoft.com> wrote in message
news:07BA7839-023F-49B9-B266-DCB72FA573CE@.microsoft.com...
> Yes, it uses :
> FOR XML EXPLICIT
> GO
>
|||Indirectly you fixed this.
When you mentioned the parameter I realised that it should have the same name as the name given in the stored procedure. It still didn't fix the problem but caused me to look more closely at the query.
The reason I got no XML back was because in the query I had the stored procedure name as sp100pamenu_select when it is in fact sp100pamenus_select.
I think that the stream should report some sort of error in this situation Rather than just giving no xml back it would be nice if the ADO responded by giving an error stating that the procedure does not exist in the database. Does anyone have an example
of an ADO stream with error handling built in?
Thank you very much for the help.
|||Glad I could help by not helping.
Irwin Dolobowsky
Program Manager - SqlXml
http://weblogs.asp.net/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard P" <anonymous@.discussions.microsoft.com> wrote in message
news:A6280EE6-D769-4A50-9558-BD4964FC8375@.microsoft.com...
> Indirectly you fixed this.
> When you mentioned the parameter I realised that it should have the same
name as the name given in the stored procedure. It still didn't fix the
problem but caused me to look more closely at the query.
> The reason I got no XML back was because in the query I had the stored
procedure name as sp100pamenu_select when it is in fact sp100pamenus_select.
> I think that the stream should report some sort of error in this situation
Rather than just giving no xml back it would be nice if the ADO responded by
giving an error stating that the procedure does not exist in the database.
Does anyone have an example of an ADO stream with error handling built in?
> Thank you very much for the help.

No comments:

Post a Comment