DRAG DROP
There is MS Visual Studio 2010 and MS .NET Framework 4 application PassGuideApp.
PassGuideApp connects to a MS SQL Server 2008 database PassGuideDB.
PassGuideApp is calling a stored procedure that has a table-valued parameter.
What steps do you need to take to make this work?
Leave a Reply
The specified answer is incorrect, based on the following article:
http://msdn.microsoft.com/en-us/library/bb675163%28v=vs.110%29.aspx
I can see that the following actions are required:
Action#1: Create SQLParameter object
Action#2: Set the SqlDbType of the parameter to… Structured
But nowhere in MSDN samples do I see TypeName being set to Udt. In fact the only member you can set to Udt is SqlDbType, and we already set it to Structured. Udt is for non-table structured data only.
The only other answer that makes sense, but is not actually required is the following:
Action#3: Set the Parameter Direction of the parameter to… Input
And that’s what I’ll be sticking with if I see this shitty question on the exam.
Another related link:
http://msdn.microsoft.com/en-us/library/system.data.sqldbtype%28v=vs.110%29.aspx
Structured – A special data type for specifying structured data contained in table-valued parameters.
Another related link:
http://msdn.microsoft.com/en-us/library/system.data.sqldbtype%28v=vs.110%29.aspx
SqlDbType.Structured = A special data type for specifying structured data contained in table-valued parameters.
OOps, disregard my comment above, it was meant for previous question not this one.
The specified answer is correct, according to the following link:
http://www.anujvarma.com/sqlgeometry-data-type-versus-sqldbtypes/
* Set the SqlDbType to UDT (User Defined Type)
* Set the UdtTypeName to… geometry
You are right, but these questions are made of other ones that has wrong answers…