1. All of this stuff I am doing worked GREAT on my local...
2. My host is GoDaddy...
3. Sql Server 2005 ASP.Net 2.0 FrameWork
4. Problem...
- It always returns nothing in my XML... Doesn't Error Out at all
- I have Response.Write the results they are blank.
- I am using this in a stored procedure
- - 'SELECT * From dbo.TT_1 For Xml Raw' to return a string of XML
- There is one Record in the Table
- My query is coded in C#
private string GetXml()
{
// string procname = xmlIn.DocumentElement.Attributes[0].Value;
string procname = "SP_Get_TT1_Home";
string conn = "Data Source=************" +
"Initial Catalog=******;" +
"User ID=*****;" +
"Password=*******";
SqlRequests Proc = new SqlRequests();
XmlDocument xmlDoc = Proc.Procedure(procname, conn);
Response.Write(xmlDoc);
try
{
xmlDoc.RemoveChild((XmlNode)xmlDoc.DocumentType);
}
catch { }
return xmlDoc.OuterXml;
}
- It calls this part in my SQL request Object.
public XmlDocument Procedure(string qCommand, string qConnect)
{
SqlConnection Connect = new SqlConnection(qConnect);
Connect.Open();
SqlCommand pCmd = new SqlCommand("dbo." + qCommand, Connect);
pCmd.CommandType = CommandType.StoredProcedure;
//pCmd.Parameters.Add("@TableName", SqlDbType.NChar);
//pCmd.Parameters["@TableName"].Value = procValue;
pCmd.ExecuteNonQuery();
XmlReader prdr = pCmd.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
while (prdr.Read())
{
xmlDoc.Load(prdr);
}
Connect.Close();
prdr.Close();
pCmd.Dispose();
return xmlDoc;
}
- Please help I need this done by monday. I just dont understand why it is returning blank. It makes no sense to me when it all worked on my local.
2. My host is GoDaddy...
3. Sql Server 2005 ASP.Net 2.0 FrameWork
4. Problem...
- It always returns nothing in my XML... Doesn't Error Out at all
- I have Response.Write the results they are blank.
- I am using this in a stored procedure
- - 'SELECT * From dbo.TT_1 For Xml Raw' to return a string of XML
- There is one Record in the Table
- My query is coded in C#
private string GetXml()
{
// string procname = xmlIn.DocumentElement.Attributes[0].Value;
string procname = "SP_Get_TT1_Home";
string conn = "Data Source=************" +
"Initial Catalog=******;" +
"User ID=*****;" +
"Password=*******";
SqlRequests Proc = new SqlRequests();
XmlDocument xmlDoc = Proc.Procedure(procname, conn);
Response.Write(xmlDoc);
try
{
xmlDoc.RemoveChild((XmlNode)xmlDoc.DocumentType);
}
catch { }
return xmlDoc.OuterXml;
}
- It calls this part in my SQL request Object.
public XmlDocument Procedure(string qCommand, string qConnect)
{
SqlConnection Connect = new SqlConnection(qConnect);
Connect.Open();
SqlCommand pCmd = new SqlCommand("dbo." + qCommand, Connect);
pCmd.CommandType = CommandType.StoredProcedure;
//pCmd.Parameters.Add("@TableName", SqlDbType.NChar);
//pCmd.Parameters["@TableName"].Value = procValue;
pCmd.ExecuteNonQuery();
XmlReader prdr = pCmd.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
while (prdr.Read())
{
xmlDoc.Load(prdr);
}
Connect.Close();
prdr.Close();
pCmd.Dispose();
return xmlDoc;
}
- Please help I need this done by monday. I just dont understand why it is returning blank. It makes no sense to me when it all worked on my local.