CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

添加方法 (ActiveX/CAO)

2023-1-1 19:58| 发布者: admin| 查看: 200| 评论: 0|来自: AutoCAD

摘要: 将新对象添加到指定的集合。

将新对象添加到指定的集合。

签名:概述

按键说明

VBA / VB.NET

RetVal = object.Add(Name, DataType [, Precision] [, Scale])
键值

VBA / VB.NET

RetVal = object.Add(FieldName, Value)
标签模板

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, DisplayAttributes)
链接模板

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, KeyDescriptions)
查询

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, SQLText)

签名:密钥说明.添加

VBA / VB.NET

RetVal = object.Add(Name, DataType [, Precision] [, Scale])
对象

类型:按键说明

此方法适用的一个或多个对象。

名字

类型:字符串;仅输入

要添加的列的名称。

数据类型

类型:CaoDataType 枚举;仅输入

要添加的列的数据类型。指定以下常量之一:

  • kCaoTypeText
  • kCaoTypeNumeric
  • kCaoTypeInteger
  • kCaoTypeDouble
  • kCaoTypeDate
  • kCaoTypeTime
  • kCaoTypeTimestamp
  • kCaoTypeBit
  • kCaoTypeBlob
精度

类型:整数;仅输入;自选

精度的含义取决于指定的数据类型,如下所示:

  • kCaoTypeNumeric:数值数据的精度
  • kCaoTypeText:以符号为单位的数据长度
  • kCaoTypeBlob:以位为单位的数据长度

对于所有其他数据类型,将忽略精度。

规模

类型:整数;仅输入;自选

数字刻度。对于所有其他数据类型,忽略。kCaoTypeNumeric

雷瓦尔

Type: KeyDescription

The newly added object.

Signature: KeyValues.Add

VBA / VB.NET

RetVal = object.Add(FieldName, Value)
object

Type: KeyValues

The object or objects this method applies to.

FieldName

Type: String; input-only

The name of the field to be added.

Value

Type: Variant; input-only

The value of the field being added.

RetVal

Type: KeyValue

The newly added object.

Signature: LabelTemplates.Add

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, DisplayAttributes)
object

Type: LabelTemplates

The object or objects this method applies to.

DataSource

Type: String; input-only

Data source name.

Catalog

Type: String; input-only

Catalog name.

Schema

Type: String; input-only

Schema name.

Table

Type: String; input-only

Table name.

Name

Type: String; input-only

Label template name.

DisplayAttributes

Type: Variant (String or array of strings); input-only

Column names to be displayed as label or format strings. Where a single string is specified, CAO assumes the string is a format string. An array of strings is interpreted as a list of column names.

Format strings are compatible with MText format strings. Refer to database table columns in format strings using the following syntax:

#(<column name>)

For example:

#(name)

Column names are converted to the following format string:

#(<column name 1>\P#(<column name 2>)
RetVal

Type: LabelTemplate

The newly added object.

Signature: LinkTemplates.Add

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, KeyDescriptions)
object

Type: LabelTemplates

The object or objects this method applies to.

DataSource

Type: String; input-only

Data source name.

Catalog

Type: String; input-only

Catalog name.

Schema

Type: String; input-only

Schema name.

Table

Type: String; input-only

Table name.

Name

Type: String; input-only

Link template name.

KeyDescriptions

Type: KeyDescriptions; input-only

Key descriptions for the link template.

RetVal

Type: LinkTemplate

The newly added object.

Signature: Queries.Add

VBA / VB.NET

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, SQLText)
object

Type: Queries

The object or objects this method applies to.

数据源

类型:字符串;仅输入

数据源名称。

目录

类型:字符串;仅输入

目录名称。

图式

类型:字符串;仅输入

架构名称。

桌子

类型:字符串;仅输入

表名。

名字

类型:字符串;仅输入

链接模板名称。

SQLText

类型:字符串;仅输入

SQL 语句。

雷瓦尔

类型:查询

新添加的对象。


路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-12 17:08

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部