2010-12-18 6 views

答えて

0

私はこれをやろうとはしませんでしたが、EntLibデータブロックをすばやく見ていましたが、これを達成するための簡単な方法はありません。 SqlClientオブジェクトで行うことはできますが、EntLibはTVPとしてデータを渡す必要があるStructuredデータ型をサポートしていません。

SQL Serverバックエンド以外のものを絶対に使用しないことが保証されている場合は、SQLServer固有のものへの接続をキャストしてからSqlParametersを使用することができますが、これはEntLibをいくらか使用する目的を破るでしょう。

+0

ありがとう。私は明らかな方法も見ていなかったので、私はADO.NETを使ってそれをやっただけです。それほど悪くはありません。 :) – birdus

+0

これはSql 2008のみの機能なので、現在サポートされていません。追加するための多くの顧客からの要請はありませんでした。 –

0

グッドラック... http://msdn.microsoft.com/en-us/library/bb675163.aspx 引用:テーブル値パラメータの

制限

テーブル値パラメータにはいくつかの制限があります。

You cannot pass table-valued parameters to CLR user-defined functions. 

Table-valued parameters can only be indexed to support UNIQUE or PRIMARY KEY constraints. 
SQL Server does not maintain statistics on table-valued parameters. 

Table-valued parameters are read-only in Transact-SQL code. 
You cannot update the column values in the rows of a table-valued parameter and you cannot insert or delete rows. 
To modify the data that is passed to a stored procedure or parameterized statement 
in table-valued parameter, you must insert the data into a temporary table or into a table variable. 

You cannot use ALTER TABLE statements to modify the design of table-valued parameters. 
関連する問題