What does SqlDbType.Structured mean?

帅比萌擦擦* 提交于 2019-11-30 04:21:03

问题


From msdn website I get the following:

A special data type for specifying structured data contained in table-valued parameters.

It seems my code works with it and without it (pushing table to DB using stored procedure).

Can someone explain what does it do - I didn't understand it from the definition.


回答1:


In SQL Server, you can define stored procedures and you can pass tables as parameter. This is then called a table valued parameter.

When you are programming in C#, you can pass such a table-valued parameter to the database by using the SqlDbType.Structured constant.

This post shows an example: How to pass a table-value parameter



来源:https://stackoverflow.com/questions/31250401/what-does-sqldbtype-structured-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!