我们如何将xml作为参数传递,因为参数之一是从前端传递到业务层,从数据访问层到最终传递到数据库

我们如何将xml作为参数传递,因为参数之一是从前端传递到业务层,从数据访问层到最终传递到数据库

问题描述:

我们如何将xml作为参数传递,因为参数whis是从前端传递到业务层,从数据访问层到最终传递到数据库.


例如:我想知道如何将xml文件或xml数据传递到数据库,以及如何将xml数据插入sqltable.


像:

how do we pass xml as parameter as one of parameter whis is passing from front end to businesslayer and from to dataaccesslayer and finally to database.


ex:i want to know how to pass the xml file or xml data, to database and to insert the xml data into sqltable.


like :

public int InsertDataIntoDb(int Id, String Ename, Xml xml)
        {
        }


最后是sqlserver如何从xml参数中获取值.



以及将xml作为参数传递的好处是什么.

我是一种非常新的东西,


and finally how sqlserver take the values from the xml parameter.



and what is advantage to pass xml as parameter .

im very new this kind of stuff,



除非非常需要,否则不要将XML作为参数传递,如果您将其存储为XML,那么将很难搜索到XML内容作为参数,就像您所说的那样,您是所有这些东西的初学者.这样做的做法很多.

最好使用Column,传递类并将其存储在数据库中
Hi,

Don''t pass XML as a parameter till it is Highly required, if you store as XML, you will find difficult to search, the XML content as a parameter, as you are saying, you are beginner to all these stuffs, you need lot of practise to do so.

Better use Column, pass class and store it in DB