FoxDataObjects

Object-Relational Mapping Tool for Visual FoxPro®

 CreateSchema  Method

 

 

Creates an empty mapping schema file.

 Session.CreateSchema([cFileName][,lOverWrite][,lCreateAndLoad])

 

Parameters

 

cFileName

 

Full path and name for the mapping schema file to create.

lOverWrite

 

Specifies whether to overwrite an existing file with the same name.

lCreateAndLoad

 

Specifies whether to load the new schema file as the main mapping schema in the current session.

 

Return Value

 

Logical

Remarks

 

This method tries to create a new mapping schema file and returns True (.T.) if successful.

If the Session.MappingSchema.LearningMode is set to 2 (LEARNINGMODE_ASSISTED), the Schema Manager mapping tool is loaded and the New Schema form appears for you to confirm/modify the new schema file location. In this case, the cFileName parameter becomes optional. After the file was created, the Schema Options property page is loaded, for you to check/modify some default mapping schema options stored on the new mapping file.

If the Session.MappingSchema.LearningMode is set to a value lower than 2, the new file is created with default values without user intervention.

If the optional lCreateAndLoad parameter is passed with a True (.T.) value, the new schema file is loaded and is set as the main schema file for the current session (loaded schema files are closed).

Another way to create schema files is by using the Schema Manager mapping tool. For a complete reference please check the Schema Manager mapping tool Guide.

 

See Also

MappingSchema.LearningMode property
Applies to: Session object

Send feedback on this topic to RunAhead Technologies

For Technical support and product issues please contact us at support@foxdataobjects.com or visit http://www.foxdataobjects.com

Copyright (c) 2000-2005 RunAhead Technologies