WriteObject - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

WriteObject

Purpose

The CMetaObject class WriteObject function writes the memory object to the repository.

Description

If the object does not exist, the WriteObject function creates the object in the repository. If the object exists WriteObject will:

  • overwrite the object in the repository if data versioning is not allowed for the class containing the object.
  • will create a new version of the object from the current version of the object if data versioning is allowed for the class containing the object.
  • If an existing object is being updated it is strongly recommended that the application do a ReadObject of the object prior to writing the new values. If a user-defined property is not set in the object and the object already exists in the repository, WriteObject will:

  • not change the existing value for the property if data versioning is not allowed for the class containing the object.
  • substitute the property‚Äôs value from the current version of the object if data versioning is allowed for the class containing the object.
  • Requirements

    If the object does not exist in the repository, a Class ID attribute is required to be set (internal or globally unique). All class properties of type SQL_DATE must also be set. The internal ObjectID set to zero indicates that this object is to be created in the repository. When the internal ObjectID is not zero, it must be for a version of the object.

    Syntax

    HRESULT WriteObject(void);