I'm trying to send a XML of aproximately 1MB as XML parameter in a Stored Procedure, but always the connection returns timeout.
Anyone knows what's the size limit for the XML type?
Environment:
- Microsoft SQL Server 2005 Express
- .NET Framework 2.0
- C#
C# Code:
using (SqlCommand commandSave = new SqlCommand("SaveScanning", this.DatabaseConnection))
{
commandSave.CommandType = System.Data.CommandType.StoredProcedure;
SqlParameter scanningData = new SqlParameter("ScanningData", System.Data.SqlDbType.Xml);
scanningData.Value = new SqlXml(new XmlTextReader(**HEREISTHEXMLSTRING**, XmlNodeType.Document, null));
commandSave.Parameters.Add(scanningData);
commandSave.ExecuteNonQuery();
}
SQL Code:
CREATE PROCEDURE [dbo].[SaveScanning]
(
@ScanningData XML
)
AS
BEGIN
.
.
.