JavaScript Editor js editor     Web development 

Main Page

Specifies an alias name for the appropriate object. Read/write at design time and run time.

The Alias property mimics the behavior of the ALIAS clause in the USE command. There are several versions of this syntax.

DataEnvironment.Cursor.Alias [= cText]
CursorAdapter.Alias [= cText]
XMLTable.Alias [= cText]
XMLTable.XMLField.Alias [= cText]

Return Value


Character data type. The following table describes the values for cText, depending on the object.

Object cText


Alias name for each table or view associated with the cursor.


Alias name for the cursor generated by the SelectCmd property.


Alias name for the Visual FoxPro cursor.

If cText is an empty string (""), the XMLAdapterВ ToXML method adds the table schema but does not add any data.


Alias name for the field name in the Visual FoxPro cursor.

If cText is an empty string (""), the XMLTableВ ToCursor and ApplyDiffGram methods disregard the field.


Applies To: Cursor Object | CursorAdapter Class | XMLTable Class | XMLField Class

For Cursor objects, when Visual FoxPro loads the data environment, it assigns an alias name that is the same as the table or view name to each table or view associated with the cursor by default. You can change the Alias property to override the default alias name.

For CursorAdapter objects, Visual FoxPro uses Alias property to resolve the correct alias name for tables and fields that you drag and drop to the form from the data environment at design time. If you do not specify values for Alias, Visual FoxPro generates an error and, at run time, uses the default aliases for the tables and fields.

For XMLTable and XMLField objects, Visual FoxPro loads the value of the XMLName property into the corresponding Alias property for those objects by default. If the XMLFieldВ Alias property is empty, the XMLTableВ ToCursor method disregards XMLField objects and creates a cursor that does not include any fields specified by those XMLField objects.

If you change the Alias property, Visual FoxPro also renames the cursor created by the ToCursor method and the Alias properties for XMLTable and XMLField objects.

When executing the ToXML method, Visual FoxPro uses the XMLName property instead of the AliasВ  property.

See Also

JavaScript Editor js editor     Web development