Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
509 views
in Technique[技术] by (71.8m points)

c# - What does SqlDbType.Structured mean?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...