ADO.NET - SQL sp Help please

  • Thread starter Thread starter jim
  • Start date Start date
J

jim

This sp works when I run it through debug in query analyzer but not when I
run it from VS server Explorer. Any idea what the difference is?

ALTER Procedure GetScores
@Key NVARCHAR(100)
AS
SELECT
1 AS TAG
,NULL AS PARENT
,NULL AS 'Results!1!Id'
,NULL AS 'Result!2!Trait'
,NULL AS 'Result!2!Score'
UNION
SELECT
2
,1
,NULL
,Trait
,SUM(Score)
FROM NewRes
WHERE (SessionID = @Key)
GROUP BY Trait
ORDER BY 'Result!2!Trait'
FOR XML EXPLICIT
Return
 
I'm not calling this sp from code yet. I'm just testing it to see that I
get the results I want returned. I get the correct result when I run it
through SQL Query Analyzer but I dont get a result in the output window in
Visual studio when I run the sp through sever explorer. I will eventualy
pas the XML string into a chart control to display on an aspx page but I
need to get the XML string first.
 
Hi,

jim said:
I'm not calling this sp from code yet. I'm just testing it to see that I
get the results I want returned. I get the correct result when I run it
through SQL Query Analyzer but I dont get a result in the output window in
Visual studio when I run the sp through sever explorer.

It is probably a limitation of server explorer.

I will eventualy
pas the XML string into a chart control to display on an aspx page but I
need to get the XML string first.

Try to access it within code. It should work.
You'll have to invoke SqlCommand.ExecuteXmlReader() method.
 
Jim,

You didn't tell us what happens.

Kathleen

jim said:
I'm not calling this sp from code yet. I'm just testing it to see that I
get the results I want returned. I get the correct result when I run it
through SQL Query Analyzer but I dont get a result in the output window in
Visual studio when I run the sp through sever explorer. I will eventualy
pas the XML string into a chart control to display on an aspx page but I
need to get the XML string first.
 
Back
Top