Experts help !<BR><BR>I&#039;ve a FOR XML EXPLICIT query (stored procedure) written in SQL Server 2000. This procedure is called from within a VB.NET program and runs as windows service.<BR><BR>The query has 38 TAGS. It&#039;s too big to paste it here....<BR><BR>Once in a while It throws up following error..<BR><BR>Undeclared tag ID 23 is used in a FOR XML EXPLICIT query. - at System.Data.SqlClient.SqlCommand.ExecuteXmlReader( )<BR><BR>However if I run the same stored procedure in SQL Analyzer, executes perfect and generates the XML.<BR><BR>As a temporary solution to this problem, I&#039;m recompiling the stored procedure and works fine thereafter.<BR><BR>Any clue what&#039;s going ????<BR><BR>thanks<BR>tammi