作者指令

下面列出了Microsoft Access Writer处理的指令。显示的后缀是由当前的前缀in a mapping file. By default, the对于Microsoft Access Writer是mdb_ado.

数据集

必填/可选:Required

This is the name of the destination Microsoft Access Database file.

工作台参数:目标Microsoft Access数据库文件

PASSWORD

必填/可选:可选的

用于访问数据库的密码。对于现有数据库,可以省略无需密码保护的访问数据库。如果数据库不存在,则新创建的Microsoft Access数据库将受此密码保护。

Please note that databases associated with a Microsoft Access workgroup are not supported.

mdb_ado._PASSWORD moneypenny

工作台参数:密码

DEF

必填/可选:Required

必须在写入之前定义每个Microsoft Access表。Microsoft Access定义语句的一般形式是:

mdb_ado._DEF  \ [mdb_update_key_columns ]\ [mdb_drop_table (yes|no)]\ [mdb_truncate_table (yes|no)] \ [mdb_table_writer_mode (inherit_from_writer|insert| update|delete)] \ [[,]]+

当目标表不存在时,表定义指定将创建的表。当目标表存在并且未被删除时,列出的字段和类型应匹配现有表的字段。

编写器的表定义中的字段将由作者忽略任何现有列的字段。在哪里指定了,它应该是目标数据库支持的字段类型。

定义行上存在的配置参数在下表中描述:

范围

Contents

Tablename.

要写的表的名称。如果存在具有指定名称的表,则会被覆盖mdb_drop_tableDEFline parameter is set to YES, or it will be truncated if themdb_truncate_table defLine参数设置为是。否则表将附加。表名称的有效值包括任何字符串,其中任何字符串都没有SQL-revisored字符,长度小于128个字符。

mdb_table_writer_mode.

The the default operation mode of the feature type in terms of the types of SQL statements sent to the database.Valid values are插入,更新,删除and继承_from_Writer.。注意INSERT模式仅允许INSERToperations where asUPDATEand删除can be overwritten at the feature levels.继承_from_Writer.只需指示从Writer级别占用此值,而不会在要素类型级别覆盖它。

Default继承_from_Writer.

mdb_update_key_
columns

这是一个逗号分隔的列的列表,该列与相应的FME属性'值匹配,以指定在编写器模式是时要更新或删除哪个行UPDATEorINSERT

For example:

mdb_update_key_columns.ID

would instruct the writer to ensure that the FME attribute is always matched against the column with the same name. Also, the target table is always the feature type specified in the DEF line.

每列列出mdb_update_key_columns.除了由操作更新的列之外,必须使用DEF行上的类型定义指令。

mdb_drop_table

这指定如果表中存在此名称,则应删除并替换此定义指定的表。

默认值:否

mdb_truncate_table

This specifies that if the table exists by this name, it should be cleared prior to writing.

默认值:否

fieldName

要写的字段的名称。字段名称的有效值包括任何字符串,该字符串除了SQL-revisored字符,少于128.characters in length.

FieldType.

表中的列的类型。下面列出了字段类型的有效值:

memo

超链接

ReplicationID.

OleObject.

integer

byte

autonumber

datetime

decimal(width,decimal)

单身的

double

货币

文字(宽度)

indexType

为列创建的索引类型。

如果之前未存在表,则在表创建时,创建指定类型的数据库索引。数据库索引仅包含一个列。

The valid values for the column type are listed below:

indexed:没有约束的索引。

独特的:具有唯一约束的索引。

VERSION

必填/可选:Required

This statement tells the Microsoft Access writer what version of database should be created. If the database file already exists, the writer will automatically detect and use the correct version.

范围

Contents

要创建的Microsoft Access数据库文件的版本。有效值如下所示:

2000/2002/2003

95/97

2.0

默认值:2000/2002/2003

Example:

mdb_ado._VERSION 2000/2002/2003

工作台参数:版本

start_transaction.

必填/可选:可选的

此语句告诉Microsoft Access Writer模块何时开始将功能写入数据库时​​。在达到属于的功能之前,Microsoft Access Writer不会编写任何功能<最后成功的交易> + 1。Specifying a value of zero causes every feature to be output. Normally, the value specified is zero – a non-zero value is only specified when a data load operation is being resumed after failing partway through.

范围

Contents

<最后一次成功的交易>

The transaction number of the last successful transaction. When loading data for the first time, set this value to0.

默认:0.

Example:

mdb_ado._START_TRANSACTION 0

工作台参数:Start transaction at

TRANSACTION_INTERVAL

必填/可选:可选的

此语句通知FME在事务提交到数据库之前将要放置在每个事务中的功能数量。

如果是mdb_ado._TRANSACTION_INTERVAL未指定语句,然后将500的值用作事务间隔。

范围

Contents

单个事务中的功能数量。

默认:500

如果是mdb_ado._TRANSACTION_INTERVALis set to zero, then feature based transactions are used. As each feature is processed by the writer, they are checked for an attribute calledfme_db_transaction.。The value of this attribute specifies whether the writer should commit or rollback the current transaction. The value of the attribute can be one ofcommit_before.COMMIT_AFTERROLLBACK_AFTERorIGNORE。如果是fme_db_transaction.属性未设置在任何功能中,然后在单个事务中发生整个写操作。

Example:

mdb_ado_transaction_interval 5000.

工作台参数:交易间隔

Writer_Mode.

必填/可选:可选的

笔记:For more information, seeDatabase Writer Mode

This directive informs the Microsoft Access writer which SQL operations will be performed by default by this writer. This operation can be set toINSERTUPDATE, 或者删除。The default writer level value for this operation can be overwritten at the feature type or table level. The corresponding feature typeDEF调用参数名称mdb_table_writer_mode。它具有与Writer Level模式相同的有效选项,另外是值继承_from_Writer.这会导致写入器级别模式由要素类型继承为该表中包含的功能的默认值。

The operation can be set specifically for individual features as well, using thefme_db_operation.属性。注意,当作者模式设置toINSERT这可以防止模式从单个功能解释,并且插入所有功能。

如果是mdb_ado._WRITER_MODEstatement is not specified, then a value ofINSERT给出。

范围

Contents

应由作者执行的SQL操作类型。有效的值列表如下:

INSERT

UPDATE

删除

默认:INSERT

Example:

MDB_ADO_WRITER_MODE INSERT.

工作台参数:Writer Mode

begin_sql {n}

有时,您必须先在打开表之前执行一些SQL语句。例如,可能需要确保在尝试读取之前存在视图。

打开与数据库读取的连接后,读者查找该指令_BEGIN_SQL{n}(forN=0,1,2,...), and executes each such directive’s value as an SQL statement on the database connection.

Multiple SQL commands can be delimited by a character specified using thefme_sql_delimiter.directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution.笔记:在角色之前包含一个空格。

For example:

fme_sql_delimiter.; DELETE FROM instructors; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'

不允许使用多个分隔符,并且在发送到数据库之前将删除分隔符字符。

Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.

Required/Optional

可选的

工作台参数

Begin SQL

END_SQL{n}

Sometimes you must execute some SQL statements after a set of tables has been read. For example, it may be necessary to clean up a temporary view after creating it inbegin_sql.

就在关闭数据库上的连接之前,读者查找指令_END_SQL{n}(forN=0,1,2,...), and executes each such directive’s value as an SQL statement on the database connection.

Multiple SQL commands can be delimited by a character specified using thefme_sql_delimiter.directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution.笔记:在角色之前包含一个空格。

For example:

fme_sql_delimiter.; DELETE FROM instructors; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'

不允许使用多个分隔符,并且在发送到数据库之前将删除分隔符字符。

Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.

Required/Optional

可选的

工作台参数

End SQL

COMPRESS_AT_END

当此指令设置为“是”时,Microsoft Access Writer将在写入所有功能后压缩数据库。这使使用现有的MDB数据库选项紧凑。如果COMPRESS_AT_END不存在,则不会压缩数据库。

Required/Optional

可选的

Values

Yes | No (default)

Mapping File Syntax

_compress_at_end是的

工作台参数

Compress Database When Done

OVERWRITE_FILE

必填/可选:Required

If set to YES, deletes the existing database before writing.

工作台参数

覆盖现有数据库