CommandType

作者:vkvi 来源:ITPOW(原创) 日期:2007-4-3

相关阅读:

  • rs.open sql, conn, 1, 1 全接触
  • CursorType 和 LockType
  • CommandType
  • 游标类型与 RecordSet 的属性和方法

  • 在应用 Connection、RecordSet 和 Command 对象时,都可能涉及到 CommandType 参数(属性)值。可选值有:

    adCmdUnspecified(-1) 不指定命令类型的参数。

    adCmdText(1) 表示指定的 CommandText 是普通命令字符串,如 SQL 语句。

    adCmdTable(2) 表示指定的 CommandText 是表名,该表的列全部是由内部生成的 SQL 查询返回的。

    adCmdStoredProc(4) 表示指定的 CommandText 是存储过程名称。注意:该值为 4,不是 3,网上某些资料错误地将该值写为 3。

    adCmdUnknown(8) 默认值。表示指定的 CommandText 类型无法确定。注意:该值是 8,不是 -1,网上某些资料错误地将该值写为 -1。

    adCmdFile(256) 表示指定的 CommandText 是文件名。只与 Recordset.Open 或 Requery 一起使用。

    adCmdTableDirect(512) 表示指定的 CommandText 是表名,该表的列被全部返回。只与 Recordset.Open 或 Requery 一起使用。若要使用 Seek 方法,必须通过 adCmdTableDirect 打开 Recordset。

    相关文章