CommandStream 属性 (ADO)
指示用作 命令 对象的输入的流。
设置和返回值
设置或返回用作 Command 对象的输入的流。 此流的格式特定于提供程序;有关详细信息,请参阅提供商的文档。 此属性类似于 CommandText 属性,该属性用于为 Command的输入指定字符串。
言论
CommandStream 和 CommandText 互斥。 当用户设置 CommandStream 属性时,CommandText 属性将设置为空字符串(“)。 如果用户设置 CommandText 属性,则 CommandStream 属性将设置为 Nothing。
提供程序定义了 Command.Parameters.Refresh 和 Command.Prepare 方法的行为。 无法刷新流中的参数值。
输入流不适用于返回 命令源的其他 ADO 对象。 例如,如果将 Recordset 的 Source 设置为具有流作为输入的 Command 对象,Recordset.Source 继续返回包含空字符串(“)的 CommandText 属性,而不是 CommandStream 属性的流内容。
使用命令流(由 CommandStream指定)时,CommandType 属性的唯一有效 CommandTypeEnum 值是 adCmdText,adCmdUnknown。 任何其他值都会导致错误。