Altova XMLSpy 2023 Enterprise Edition

Method: ImportFromSchema(pImportSettings as DatabaseConnection,strTable as String,pSchemaDoc as Document) as Document

 

Return Value

Creates a new document filled with data from the specified database as specified by the schema definition in pSchemaDoc.

 

Description

ImportFromSchema imports data from a database specified in pImportSettings. Properties mandatory to be filled out are one of DatabaseConnection.File, DatabaseConnection.ADOConnection or DatabaseConnection.ODBCConnection. Additionally, you can use DatabaseConnection.AsAttributes, DatabaseConnection.ExcludeKeys and NumberDateTimeFormat to further parameterize import. All other properties get ignored.

 

ImportFromSchema  does not use an explicit SQL statement to select the data. Instead, it expects a structure definition of the document to create in form of an XML schema document in pSchemaDoc. From this definition the database select statement is automatically deduced. Specify in strTable the table name of the import root that will become the root node in the new document.

 

See GetDatabaseSettings and GetDatabaseTables for necessary steps preceding an import from a database based on a schema definition. To create the schema definition file use command 'create database schema' from the 'convert' menu of XMLSpy.

 

Errors


1111

The application object is no longer valid.


1100

Invalid parameter or invalid address for the return parameter was specified.


1107

Import from database failed.


1112

Invalid database specified.


1120

Database import failed.


1121

Could not create validator for the specified schema.


1122

Failed parsing schema for database import.

 

© 2017-2023 Altova GmbH