![]() |
Change method to send sql server sproc XML
In sql server 2000, to send an xml document to a stored procedure, I needed to use the following method:
Here is the C# .NET code to prepare the xml to be sent to sproc. Code:
con.Open();Code:
CREATE PROCEDURE [csTest].[ScanResults] (@doc ntext) |
Re: Change method to send sql server sproc XML
Also, if someone could perhaps make more clear to me, the benefits one can gain from using an xsd document in addition to using XML with SQL Server 2005. From what I understand, the xsd resides on the server and I use it to validate the xml. But how else can the xsd benefit me in terms of performance?
|
Re: Change method to send sql server sproc XML
Not sure about 2005, But XSDs can be used to exuecute queires on the SQL Database. So they can be used as alternatives to direct SQL Queries or SQL Queries in stored procedures.
The advantage is similar to SPs, where in we can jsut modify the XSD if we need to modify the data that is returned instead of changing your whole code. |
| All times are GMT +5.5. The time now is 09:15. |