@@ -4058,6 +4058,7 @@ private void PrepareDescribeParameterEncryptionRequest(_SqlRPC originalRpcReques
4058
4058
tsqlParam . SqlDbType = ( ( text . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
4059
4059
tsqlParam . Value = text ;
4060
4060
tsqlParam . Size = text . Length ;
4061
+ tsqlParam . Direction = ParameterDirection . Input ;
4061
4062
}
4062
4063
else
4063
4064
{
@@ -4075,6 +4076,7 @@ private void PrepareDescribeParameterEncryptionRequest(_SqlRPC originalRpcReques
4075
4076
tsqlParam . SqlDbType = ( ( text . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
4076
4077
tsqlParam . Value = text ;
4077
4078
tsqlParam . Size = text . Length ;
4079
+ tsqlParam . Direction = ParameterDirection . Input ;
4078
4080
}
4079
4081
}
4080
4082
@@ -4151,13 +4153,15 @@ private void PrepareDescribeParameterEncryptionRequest(_SqlRPC originalRpcReques
4151
4153
paramsParam . SqlDbType = ( ( parameterList . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
4152
4154
paramsParam . Size = parameterList . Length ;
4153
4155
paramsParam . Value = parameterList ;
4156
+ paramsParam . Direction = ParameterDirection . Input ;
4154
4157
4155
4158
if ( attestationParameters != null )
4156
4159
{
4157
4160
SqlParameter attestationParametersParam = describeParameterEncryptionRequest . systemParams [ 2 ] ;
4158
- attestationParametersParam . Direction = ParameterDirection . Input ;
4161
+ attestationParametersParam . SqlDbType = SqlDbType . VarBinary ;
4159
4162
attestationParametersParam . Size = attestationParameters . Length ;
4160
4163
attestationParametersParam . Value = attestationParameters ;
4164
+ attestationParametersParam . Direction = ParameterDirection . Input ;
4161
4165
}
4162
4166
}
4163
4167
@@ -5791,13 +5795,15 @@ private _SqlRPC BuildPrepExec(CommandBehavior behavior)
5791
5795
sqlParam . SqlDbType = ( ( paramList . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
5792
5796
sqlParam . Value = paramList ;
5793
5797
sqlParam . Size = paramList . Length ;
5798
+ sqlParam . Direction = ParameterDirection . Input ;
5794
5799
5795
5800
//@batch_text
5796
5801
string text = GetCommandText ( behavior ) ;
5797
5802
sqlParam = rpc . systemParams [ 2 ] ;
5798
5803
sqlParam . SqlDbType = ( ( text . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
5799
5804
sqlParam . Size = text . Length ;
5800
5805
sqlParam . Value = text ;
5806
+ sqlParam . Direction = ParameterDirection . Input ;
5801
5807
5802
5808
SetUpRPCParameters ( rpc , false , _parameters ) ;
5803
5809
return rpc ;
@@ -5899,6 +5905,7 @@ private _SqlRPC BuildExecute(bool inSchema)
5899
5905
//@handle
5900
5906
SqlParameter sqlParam = rpc . systemParams [ 0 ] ;
5901
5907
sqlParam . SqlDbType = SqlDbType . Int ;
5908
+ sqlParam . Size = 4 ;
5902
5909
sqlParam . Value = _prepareHandle ;
5903
5910
sqlParam . Direction = ParameterDirection . Input ;
5904
5911
@@ -5951,6 +5958,7 @@ private void BuildExecuteSql(CommandBehavior behavior, string commandText, SqlPa
5951
5958
sqlParam . SqlDbType = ( ( paramList . Length << 1 ) <= TdsEnums . TYPE_SIZE_LIMIT ) ? SqlDbType . NVarChar : SqlDbType . NText ;
5952
5959
sqlParam . Size = paramList . Length ;
5953
5960
sqlParam . Value = paramList ;
5961
+ sqlParam . Direction = ParameterDirection . Input ;
5954
5962
5955
5963
bool inSchema = ( 0 != ( behavior & CommandBehavior . SchemaOnly ) ) ;
5956
5964
SetUpRPCParameters ( rpc , inSchema , parameters ) ;
0 commit comments