Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing a Table Valued parameter to a stored procedure

Here's an example of how to use table-valued parameters in a SQL Server 2008 stored procedure using .NET.

And here's the list of parameter types in CF9.

Q: Is it possible for ColdFusion to pass a table-valued parameter to a Microsoft SQL Server 2008 stored procedure?

like image 430
Phillip Senn Avatar asked Dec 08 '22 03:12

Phillip Senn


1 Answers

Short Answer: No support, it should, vote for it!

Long Answer: Coldfusion can use JDBC, which does not yet support TVP's, but it should. Vote for the feature here: http://mssqlconn.uservoice.com/forums/113295-feature-feedback/suggestions/2269687-table-valued-parameters-tvp-support-in-jdbc

XML will work, but using TVP's makes both the client and sproc code easier to read, write, review, and debug. It is also faster in most cases depending on the API's implementation.

FYI, using Oracle is no better. They have the ARRAY SQL data type (which is closest to TVP). It is also not supported by JDBC: Using Array Objects

like image 93
marksiemers Avatar answered Dec 22 '22 00:12

marksiemers