When setting the parameter values of an ADO command object to execute a parameter query, I get this message if the data being sent to the parameter is larger than the destination field. Is there a workaround for this? RDO querydef objects automatically truncated data being passed into parameters. Here is an example of how I am setting the parameter values:
<vbcode>
Public Sub ExecuteSQL(ByVal SQL As String, ParamArray args() As Variant)
Dim i As Integer
Dim cmd As New ADODB.Command
If SQL <> vbNullString Then
cmd.CommandType = adCmdText
cmd.CommandText = SQL
cmd.ActiveConnection = cn
End If
For i = 0 To UBound(args)
cmd(i) = args(i)
Next
cmd.Execute
Set cmd = Nothing
End Sub
</vbcode>